1.0.3 • Published 7 years ago

rmtrailing v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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) //''