es-iterator-helpers
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -8,2 +8,8 @@ # Changelog | ||
## [v1.0.1](https://github.com/es-shims/iterator-helpers/compare/v1.0.0...v1.0.1) - 2023-02-07 | ||
### Commits | ||
- [Fix] `Iterator`: throw when Iterator() is called without new [`a6fc7e7`](https://github.com/es-shims/iterator-helpers/commit/a6fc7e768cbf4d43117365ec2f1bd300247d8dfd) | ||
## v1.0.0 - 2023-02-05 | ||
@@ -10,0 +16,0 @@ |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var iterProto = require('iterator.prototype'); | ||
var $Iterator = typeof Iterator === 'function' ? Iterator : function Iterator() {}; | ||
var $Iterator = typeof Iterator === 'function' ? Iterator : function Iterator() { | ||
if (!(this instanceof Iterator)) { | ||
throw new $TypeError('`Iterator` can only be called with new'); | ||
} | ||
}; | ||
@@ -7,0 +15,0 @@ if ($Iterator.prototype !== iterProto) { |
{ | ||
"name": "es-iterator-helpers", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "An ESnext spec-compliant iterator helpers shim/polyfill/replacement that works as far down as ES3.", | ||
@@ -5,0 +5,0 @@ "main": "index.json", |
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
109443
108
2542