node_modules/es-abstract/2019/IsStringPrefix.js in immosquare-cleaner-0.1.32 vs node_modules/es-abstract/2019/IsStringPrefix.js in immosquare-cleaner-0.1.38

- old
+ new

@@ -1,26 +1,22 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); +var $TypeError = require('es-errors/type'); -var $TypeError = GetIntrinsic('%TypeError%'); - var isPrefixOf = require('../helpers/isPrefixOf'); // var callBound = require('call-bind/callBound'); // var $charAt = callBound('String.prototype.charAt'); -var Type = require('./Type'); - // https://262.ecma-international.org/9.0/#sec-isstringprefix module.exports = function IsStringPrefix(p, q) { - if (Type(p) !== 'String') { + if (typeof p !== 'string') { throw new $TypeError('Assertion failed: "p" must be a String'); } - if (Type(q) !== 'String') { + if (typeof q !== 'string') { throw new $TypeError('Assertion failed: "q" must be a String'); } return isPrefixOf(p, q); /*