1.0.1 • Published 7 years ago

rmleading v1.0.1

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

rmleading

Removes dynamic leading 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 = '/';

rmLeading('/hello/world', slash); //'hello/world',
rmLeading('//hello/world', slash); //'hello/world'
rmLeading('hello/world', slash) //'hello/world'
rmLeading('///', slash); //''
rmLeading('', slash) //''