string.prototype.matchall
Advanced tools
Comparing version 4.0.10 to 4.0.11
@@ -8,2 +8,15 @@ # Changelog | ||
## [v4.0.11](https://github.com/ljharb/String.prototype.matchAll/compare/v4.0.10...v4.0.11) - 2024-03-19 | ||
### Commits | ||
- [Deps] update `call-bind`, `define-properties`, `es-abstract`, `get-intrinsic`, `internal-slot`, `regexp.prototype.flags`, `set-function-name`, `side-channel` [`628a475`](https://github.com/ljharb/String.prototype.matchAll/commit/628a475a656424c9f2b126e6c4f5a8764de60f31) | ||
- [Dev Deps] update `aud`, `mock-property`, `npmignore`, `object-inspect`, `object.assign`, `object.entries`, `tape` [`21b67f2`](https://github.com/ljharb/String.prototype.matchAll/commit/21b67f259fe1899f1e063d19e6c4da918fbd35df) | ||
- [actions] remove redundant finisher [`27e8b80`](https://github.com/ljharb/String.prototype.matchAll/commit/27e8b801c80ded69384102bb61c604a128d42e57) | ||
- [Robustness] better cache original RegExp [`92e9c59`](https://github.com/ljharb/String.prototype.matchAll/commit/92e9c597e3c80aae4ed5e34b4de988b6df015b83) | ||
- [Robustness] use `es-errors` [`f6de643`](https://github.com/ljharb/String.prototype.matchAll/commit/f6de6430a9a04d41e4bec86f2d57281c4b9daa41) | ||
- [Refactor] use `gopd` [`965a357`](https://github.com/ljharb/String.prototype.matchAll/commit/965a357a8f6ab24b81da5a7e949b643c788daf15) | ||
- [Refactor] use `es-object-atoms` where possible [`1d15123`](https://github.com/ljharb/String.prototype.matchAll/commit/1d1512306e4a7ea58c5f696666b368bb86eb7c5c) | ||
- [meta] add missing `engines.node` [`04bdb31`](https://github.com/ljharb/String.prototype.matchAll/commit/04bdb31ecdcbf45851d607f4ab3f152c7cc2951e) | ||
## [v4.0.10](https://github.com/ljharb/String.prototype.matchAll/compare/v4.0.9...v4.0.10) - 2023-09-12 | ||
@@ -10,0 +23,0 @@ |
'use strict'; | ||
var Call = require('es-abstract/2023/Call'); | ||
var Get = require('es-abstract/2023/Get'); | ||
var GetMethod = require('es-abstract/2023/GetMethod'); | ||
var IsRegExp = require('es-abstract/2023/IsRegExp'); | ||
var ToString = require('es-abstract/2023/ToString'); | ||
var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible'); | ||
var Call = require('es-abstract/2024/Call'); | ||
var Get = require('es-abstract/2024/Get'); | ||
var GetMethod = require('es-abstract/2024/GetMethod'); | ||
var IsRegExp = require('es-abstract/2024/IsRegExp'); | ||
var ToString = require('es-abstract/2024/ToString'); | ||
var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); | ||
var callBound = require('call-bind/callBound'); | ||
var hasSymbols = require('has-symbols')(); | ||
var flagsGetter = require('regexp.prototype.flags'); | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $RegExp = GetIntrinsic('%RegExp%'); | ||
var $indexOf = callBound('String.prototype.indexOf'); | ||
@@ -21,3 +24,3 @@ | ||
var matcher = GetMethod(regexp, Symbol.matchAll); | ||
if (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) { | ||
if (matcher === $RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) { | ||
return matcherPolyfill; | ||
@@ -43,3 +46,3 @@ } | ||
if ($indexOf(ToString(flags), 'g') < 0) { | ||
throw new TypeError('matchAll requires a global regular expression'); | ||
throw new $TypeError('matchAll requires a global regular expression'); | ||
} | ||
@@ -56,4 +59,4 @@ } | ||
// var rx = RegExpCreate(regexp, 'g'); | ||
var rx = new RegExp(regexp, 'g'); | ||
var rx = new $RegExp(regexp, 'g'); | ||
return Call(getMatcher(rx), rx, [S]); | ||
}; |
{ | ||
"name": "string.prototype.matchall", | ||
"version": "4.0.10", | ||
"version": "4.0.11", | ||
"description": "Spec-compliant polyfill for String.prototype.matchAll", | ||
@@ -46,11 +46,14 @@ "main": "index.js", | ||
"dependencies": { | ||
"call-bind": "^1.0.2", | ||
"define-properties": "^1.2.0", | ||
"es-abstract": "^1.22.1", | ||
"get-intrinsic": "^1.2.1", | ||
"call-bind": "^1.0.7", | ||
"define-properties": "^1.2.1", | ||
"es-abstract": "^1.23.2", | ||
"es-errors": "^1.3.0", | ||
"es-object-atoms": "^1.0.0", | ||
"get-intrinsic": "^1.2.4", | ||
"gopd": "^1.0.1", | ||
"has-symbols": "^1.0.3", | ||
"internal-slot": "^1.0.5", | ||
"regexp.prototype.flags": "^1.5.0", | ||
"set-function-name": "^2.0.0", | ||
"side-channel": "^1.0.4" | ||
"internal-slot": "^1.0.7", | ||
"regexp.prototype.flags": "^1.5.2", | ||
"set-function-name": "^2.0.2", | ||
"side-channel": "^1.0.6" | ||
}, | ||
@@ -60,3 +63,3 @@ "devDependencies": { | ||
"@ljharb/eslint-config": "^21.1.0", | ||
"aud": "^2.0.3", | ||
"aud": "^2.0.4", | ||
"auto-changelog": "^2.4.0", | ||
@@ -70,10 +73,10 @@ "es5-shim": "^4.6.7", | ||
"in-publish": "^2.0.1", | ||
"mock-property": "^1.0.0", | ||
"npmignore": "^0.3.0", | ||
"mock-property": "^1.0.3", | ||
"npmignore": "^0.3.1", | ||
"nyc": "^10.3.2", | ||
"object-inspect": "^1.12.3", | ||
"object.assign": "^4.1.4", | ||
"object.entries": "^1.1.7", | ||
"object-inspect": "^1.13.1", | ||
"object.assign": "^4.1.5", | ||
"object.entries": "^1.1.8", | ||
"safe-publish-latest": "^2.0.0", | ||
"tape": "^5.6.6" | ||
"tape": "^5.7.5" | ||
}, | ||
@@ -93,3 +96,6 @@ "auto-changelog": { | ||
] | ||
}, | ||
"engines": { | ||
"node": ">= 0.4" | ||
} | ||
} |
'use strict'; | ||
// var Construct = require('es-abstract/2023/Construct'); | ||
var CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator'); | ||
var Get = require('es-abstract/2023/Get'); | ||
var Set = require('es-abstract/2023/Set'); | ||
var SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor'); | ||
var ToLength = require('es-abstract/2023/ToLength'); | ||
var ToString = require('es-abstract/2023/ToString'); | ||
var Type = require('es-abstract/2023/Type'); | ||
var CreateRegExpStringIterator = require('es-abstract/2024/CreateRegExpStringIterator'); | ||
var Get = require('es-abstract/2024/Get'); | ||
var Set = require('es-abstract/2024/Set'); | ||
var SpeciesConstructor = require('es-abstract/2024/SpeciesConstructor'); | ||
var ToLength = require('es-abstract/2024/ToLength'); | ||
var ToString = require('es-abstract/2024/ToString'); | ||
var Type = require('es-abstract/2024/Type'); | ||
var flagsGetter = require('regexp.prototype.flags'); | ||
var setFunctionName = require('set-function-name'); | ||
var callBound = require('call-bind/callBound'); | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $indexOf = callBound('String.prototype.indexOf'); | ||
var OrigRegExp = RegExp; | ||
var OrigRegExp = GetIntrinsic('%RegExp%'); | ||
var supportsConstructingWithFlags = 'flags' in RegExp.prototype; | ||
var supportsConstructingWithFlags = 'flags' in OrigRegExp.prototype; | ||
@@ -39,3 +41,3 @@ var constructRegexWithFlags = function constructRegex(C, R) { | ||
if (Type(R) !== 'Object') { | ||
throw new TypeError('"this" value must be an Object'); | ||
throw new $TypeError('"this" value must be an Object'); | ||
} | ||
@@ -42,0 +44,0 @@ var S = ToString(string); |
@@ -5,2 +5,4 @@ 'use strict'; | ||
var hasSymbols = require('has-symbols')(); | ||
var gOPD = require('gopd'); | ||
var getPolyfill = require('./polyfill'); | ||
@@ -10,3 +12,2 @@ var regexpMatchAllPolyfill = require('./polyfill-regexp-matchall'); | ||
var defineP = Object.defineProperty; | ||
var gOPD = Object.getOwnPropertyDescriptor; | ||
@@ -13,0 +14,0 @@ module.exports = function shimMatchAll() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38509
469
12
+ Addedes-errors@^1.3.0
+ Addedes-object-atoms@^1.0.0
+ Addedgopd@^1.0.1
+ Addedes-abstract@1.23.4(transitive)
- Removedes-abstract@1.23.5(transitive)
Updatedcall-bind@^1.0.7
Updateddefine-properties@^1.2.1
Updatedes-abstract@^1.23.2
Updatedget-intrinsic@^1.2.4
Updatedinternal-slot@^1.0.7
Updatedset-function-name@^2.0.2
Updatedside-channel@^1.0.6