strip-outer

Strip a substring from the start/end of a string


Keywords
strip, trim, remove, outer, string, substring, start, end, wrap, leading, trailing
License
MIT
Install
npm install strip-outer@2.0.0

Documentation

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'