Comparing version 1.0.3 to 1.0.4
@@ -8,2 +8,16 @@ # Changelog | ||
## [v1.0.4](https://github.com/mathiasbynens/Array.of/compare/v1.0.3...v1.0.4) - 2024-09-04 | ||
### Fixed | ||
- [Fix] bind the index so the builtin is not mutated [`#12`](https://github.com/mathiasbynens/Array.of/issues/12) | ||
### Commits | ||
- [Tests] replace `aud` with `npm audit` [`c603988`](https://github.com/mathiasbynens/Array.of/commit/c603988960a347f21b808e08a29b3b79a8cadb4b) | ||
- [meta] add missing `engines.node` [`e3f52cc`](https://github.com/mathiasbynens/Array.of/commit/e3f52ccb1578c4571452ba30581cb66a231b48d5) | ||
- [Dev Deps] update `@es-shims/api` [`f7f79ac`](https://github.com/mathiasbynens/Array.of/commit/f7f79ac96240a4e9880350de8d91e11645cf52e4) | ||
- [Dev Deps] update `tape` [`7b68b4f`](https://github.com/mathiasbynens/Array.of/commit/7b68b4f63dd758e36fe3a22baee1f5e3fb85953f) | ||
- [Dev Deps] add missing peer dep [`e69efb3`](https://github.com/mathiasbynens/Array.of/commit/e69efb3838fa8540073cf1872a542710e5067dc4) | ||
## [v1.0.3](https://github.com/mathiasbynens/Array.of/compare/v1.0.2...v1.0.3) - 2024-05-28 | ||
@@ -10,0 +24,0 @@ |
12
index.js
'use strict'; | ||
var callBind = require('call-bind'); | ||
var define = require('define-properties'); | ||
@@ -9,5 +10,10 @@ | ||
var polyfill = getPolyfill(); | ||
var bound = callBind.apply(getPolyfill()); | ||
define(polyfill, { | ||
var rebindable = function of() { | ||
// eslint-disable-next-line no-invalid-this | ||
return bound(typeof this === 'undefined' ? Array : this, arguments); | ||
}; | ||
define(rebindable, { | ||
'getPolyfill': getPolyfill, | ||
@@ -18,2 +24,2 @@ 'implementation': implementation, | ||
module.exports = polyfill; | ||
module.exports = rebindable; |
{ | ||
"name": "array.of", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A robust & optimized `Array.of` polyfill, based on the ECMAScript 6 specification.", | ||
@@ -41,3 +41,3 @@ "homepage": "https://mths.be/array-of", | ||
"tests-only": "nyc tape 'test/**/*.js'", | ||
"posttest": "aud --production", | ||
"posttest": "npx npm@'>=10.2' audit --production", | ||
"lint": "eslint --ext=js,mjs .", | ||
@@ -49,6 +49,6 @@ "postlint": "es-shim-api --bound", | ||
"devDependencies": { | ||
"@es-shims/api": "^2.5.0", | ||
"@es-shims/api": "^2.5.1", | ||
"@ljharb/eslint-config": "^21.1.1", | ||
"aud": "^2.0.3", | ||
"auto-changelog": "^2.4.0", | ||
"encoding": "^0.1.13", | ||
"eslint": "=8.8.0", | ||
@@ -59,5 +59,6 @@ "functions-have-names": "^1.2.3", | ||
"safe-publish-latest": "^2.0.0", | ||
"tape": "^5.7.5" | ||
"tape": "^5.8.1" | ||
}, | ||
"dependencies": { | ||
"call-bind": "^1.0.7", | ||
"define-properties": "^1.2.1", | ||
@@ -73,3 +74,6 @@ "es-abstract": "^1.23.3" | ||
"hideCredit": true | ||
}, | ||
"engines": { | ||
"node": ">= 0.4" | ||
} | ||
} |
22400
177
3
+ Addedcall-bind@^1.0.7
+ Addedcall-bind-apply-helpers@1.0.1(transitive)
- Removedcall-bind-apply-helpers@1.0.2(transitive)