Urara-Blog/node_modules/.pnpm-store/v3/files/d2/5212dab09c049b11a1b3854146d03fdcc2077f627e0d2ac110c6524043454b1b8aa31385c10dde6f99a82ee38bfbbfc00b5fd13947fd8b3f9f8937ad8e0294
2022-08-14 01:14:53 +08:00

13 lines
305 B
Text

'use strict';
var $strSlice = require('call-bind/callBound')('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;
};