rmtrailing

1.0.3 • Public • Published

rmTrailing

Removes dynamic trailing substring. Use if: what you want to remove is stored in a variable. Otherwise: you may want to use .replace() or a more specific module

How to use

Prerequisite

None

Example

var slash = '/';
 
rmTrailing('hello/world/', slash); //'hello/world',
rmTrailing('hello/world//', slash); //'hello/world'
rmTrailing('hello/world', slash) //'hello/world'
rmTrailing('///', slash); //''
rmTrailing('', slash) //''

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    3
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i rmtrailing

Weekly Downloads

3

Version

1.0.3

License

MIT

Last publish

Collaborators

  • danielcobo