14 lines
385 B
JavaScript
14 lines
385 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
var hasStartsWith = String.prototype.startsWith;
|
|
if (hasStartsWith) {
|
|
exports.startsWith = function (str, strToFind) {
|
|
return str.startsWith(strToFind);
|
|
};
|
|
}
|
|
else {
|
|
exports.startsWith = function (str, strToFind) {
|
|
return str.lastIndexOf(strToFind, 0) === 0;
|
|
};
|
|
}
|