Newline Proliferating Maniac
Wondering what’s next for npm?Check out our public roadmap! »

string-slice

0.1.0 • Public • Published

string-slice

An implementation of String.prototype.slice that works with arbitrary strings, including those containing astral symbols.

Install

$ npm install --save string-slice

Usage

The API is identical to that of String.prototype.slice.

stringSlice('foobar', 1, 3);
// => 'oo'
 
stringSlice('𝐀𝐁𝐂𝐃', -1));
// => '𝐃'

License

MIT © Martin Svanberg

Install

npm i string-slice

DownloadsWeekly Downloads

5

Version

0.1.0

License

MIT

Last publish

Collaborators

  • avatar