Strip a substring from the start/end of a string
$ npm install --save strip-outer
const stripOuter = require('strip-outer'); stripOuter('foobarfoo', 'foo'); //=> 'bar' stripOuter('unicorncake', 'unicorn'); //=> 'cake'
MIT © Sindre Sorhus