Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

strip-outer

sindresorhus12.4mMIT2.0.0

Strip a substring from the start/end of a string

strip, trim, remove, outer, string, substring, start, end, wrap, leading, trailing

readme

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'