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

string-left

0.0.6 • Public • Published

string-left

NOTE: string-left was renamed to @extra-string/left. NPM

Return leftmost part of string.

var left = require('string-left');
// left(<string>, <length>)
 
left('Thai Sweet Chilli Sauce', 4);  // 'Thai'
left('Thai Sweet Chilli Sauce', 10); // 'Thai Sweet'
left('Thai Sweet Chilli Sauce', 80); // 'Thai Sweet Chilli Sauce'
left('Thai Sweet Chilli Sauce', -1); // ''

Keywords

Install

npm i string-left

DownloadsWeekly Downloads

2

Version

0.0.6

License

MIT

Unpacked Size

2.26 kB

Total Files

4

Last publish

Collaborators

  • avatar