$ cnpm install end-with
Determines whether a string ends with the characters of another string.
ES2015 String#endsWith() ponyfill.
Ponyfill: A polyfill that doesn't overwrite the native method.
$ npm install --save end-with
For more use-cases see the tests
var endWith = require('end-with');
endWith('abcde', 'e'); // => true
endWith('abcde', 'de'); // => true
endWith('abcde', 'bc'); // => false
endWith('abcde', ''); // => true
endWith('abcde'); // => false
endWith('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 |