Packages
A web application in pursuit of meaning in life.
Retired package: Complete rewrite, scratch old versions
Current section
Files
Jump to
Current section
Files
assets/node_modules/mout/string/startsWith.js
var toString = require('../lang/toString');
/**
* Checks if string starts with specified prefix.
*/
function startsWith(str, prefix) {
str = toString(str);
prefix = toString(prefix);
return str.indexOf(prefix) === 0;
}
module.exports = startsWith;