node_modules/es-abstract/2022/IsStringWellFormedUnicode.js in immosquare-cleaner-0.1.32 vs node_modules/es-abstract/2022/IsStringWellFormedUnicode.js in immosquare-cleaner-0.1.38
- old
+ new
@@ -1,17 +1,14 @@
'use strict';
-var GetIntrinsic = require('get-intrinsic');
var CodePointAt = require('./CodePointAt');
-var $TypeError = GetIntrinsic('%TypeError%');
+var $TypeError = require('es-errors/type');
-var Type = require('./Type');
-
// https://262.ecma-international.org/13.0/#sec-isstringwellformedunicode
module.exports = function IsStringWellFormedUnicode(string) {
- if (Type(string) !== 'String') {
+ if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var strLen = string.length; // step 1
var k = 0; // step 2
while (k !== strLen) { // step 3