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

Package Sidebar

Install

npm i rmleading

Weekly Downloads

7

Version

1.0.1

License

MIT

Last publish

Collaborators

  • danielcobo