strip-outer

Strip a substring from the start/end of a string

MIT License

Downloads
18.2M
Stars
22
Committers
3

strip-outer

Strip a substring from the start/end of a string

Install

$ npm install strip-outer

Usage

import stripOuter from 'strip-outer';

stripOuter('foobarfoo', 'foo');
//=> 'bar'

stripOuter('unicorncake', 'unicorn');
//=> 'cake'