Skip to content
Strip a substring from the start/end of a string
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig Require Node.js 6 Mar 23, 2018
.gitattributes Meta tweaks Jun 10, 2016
.gitignore Require Node.js 6 Mar 23, 2018
.npmrc Require Node.js 6 Mar 23, 2018
.travis.yml Require Node.js 6 Mar 23, 2018
index.js
license Require Node.js 6 Mar 23, 2018
package.json Require Node.js 6 Mar 23, 2018
readme.md Require Node.js 6 Mar 23, 2018
test.js Require Node.js 6 Mar 23, 2018

readme.md

strip-outer Build Status

Strip a substring from the start/end of a string

Install

$ npm install strip-outer

Usage

const stripOuter = require('strip-outer');

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

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

License

MIT © Sindre Sorhus

You can’t perform that action at this time.