
| Current Path : /usr/share/nodejs/json-stringify-safe/node_modules/must/lib/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //usr/share/nodejs/json-stringify-safe/node_modules/must/lib/es6.js |
exports.setPrototypeOf = Object.setPrototypeOf || function(obj, prototype) {
/* eslint no-proto: 0 */
obj.__proto__ = prototype
return obj
}
exports.startsWith = String.prototype.startsWith ?
Function.call.bind(String.prototype.startsWith) :
function(haystack, needle) {
return haystack.lastIndexOf(needle, 0) === 0
}
exports.endsWith = String.prototype.endsWith ?
Function.call.bind(String.prototype.endsWith) :
function(haystack, needle) {
return haystack.indexOf(needle, haystack.length - needle.length) >= 0
}