$ cnpm install start-with
Determines whether a string begins with the characters of another string.
ES2015 String#startsWith() ponyfill.
Ponyfill: A polyfill that doesn't overwrite the native method.
$ npm install --save start-with
For more use-cases see the tests
var startWith = require('start-with');
startWith('abcde', 'a'); // => true
startWith('abcde', 'ab'); // => true
startWith('abcde', 'bc'); // => false
startWith('abcde', ''); // => true
startWith('abcde'); // => false
startWith('abcde', null); // => false
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.
Copyright 2013 - present © cnpmjs.org | Home |