|
|
%!s(int64=5) %!d(string=hai) anos | |
|---|---|---|
| .. | ||
| index.js | %!s(int64=5) %!d(string=hai) anos | |
| license | %!s(int64=5) %!d(string=hai) anos | |
| package.json | %!s(int64=5) %!d(string=hai) anos | |
| readme.md | %!s(int64=5) %!d(string=hai) anos | |
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