Files
lcbp3.np-dms.work/frontend/node_modules/es-abstract/helpers/isPrefixOf.js
2025-09-21 20:29:15 +07:00

14 lines
296 B
JavaScript
Executable File

'use strict';
var $strSlice = require('call-bound')('String.prototype.slice');
module.exports = function isPrefixOf(prefix, string) {
if (prefix === string) {
return true;
}
if (prefix.length > string.length) {
return false;
}
return $strSlice(string, 0, prefix.length) === prefix;
};