Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

rmleading

1.0.1 • Public • Published

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

Install

npm i rmleading

DownloadsWeekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • avatar