array.prototype.flat
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -0,1 +1,11 @@ | ||
1.2.3 / 2019-12-12 | ||
================= | ||
* [Refactor] use split-up `es-abstract` (65% bundle size decrease) | ||
* [Deps] update `es-abstract` | ||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `object-inspect` | ||
* [meta] ESnext -> ES2019 | ||
* [meta] add `funding` field | ||
* [Tests] use shared travis-ci configs | ||
* [actions] add automatic rebasing / merge commit blocking | ||
1.2.2 / 2019-10-10 | ||
@@ -2,0 +12,0 @@ ================= |
'use strict'; | ||
var ES = require('es-abstract/es2019'); | ||
var ArraySpeciesCreate = require('es-abstract/2019/ArraySpeciesCreate'); | ||
var FlattenIntoArray = require('es-abstract/2019/FlattenIntoArray'); | ||
var Get = require('es-abstract/2019/Get'); | ||
var ToInteger = require('es-abstract/2019/ToInteger'); | ||
var ToLength = require('es-abstract/2019/ToLength'); | ||
var ToObject = require('es-abstract/2019/ToObject'); | ||
module.exports = function flat() { | ||
var O = ES.ToObject(this); | ||
var sourceLen = ES.ToLength(ES.Get(O, 'length')); | ||
var O = ToObject(this); | ||
var sourceLen = ToLength(Get(O, 'length')); | ||
var depthNum = 1; | ||
if (arguments.length > 0 && typeof arguments[0] !== 'undefined') { | ||
depthNum = ES.ToInteger(arguments[0]); | ||
depthNum = ToInteger(arguments[0]); | ||
} | ||
var A = ES.ArraySpeciesCreate(O, 0); | ||
ES.FlattenIntoArray(A, O, sourceLen, 0, depthNum); | ||
var A = ArraySpeciesCreate(O, 0); | ||
FlattenIntoArray(A, O, sourceLen, 0, depthNum); | ||
return A; | ||
}; |
'use strict'; | ||
var define = require('define-properties'); | ||
var bind = require('function-bind'); | ||
var callBind = require('es-abstract/helpers/callBind'); | ||
@@ -11,3 +11,3 @@ var implementation = require('./implementation'); | ||
var boundFlat = bind.call(Function.call, polyfill); | ||
var boundFlat = callBind(polyfill); | ||
@@ -14,0 +14,0 @@ define(boundFlat, { |
{ | ||
"name": "array.prototype.flat", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"author": { | ||
@@ -9,2 +9,5 @@ "name": "Jordan Harband", | ||
}, | ||
"funding": { | ||
"url": "https://github.com/sponsors/ljharb" | ||
}, | ||
"contributors": [ | ||
@@ -17,3 +20,3 @@ { | ||
], | ||
"description": "An ESnext spec-compliant `Array.prototype.flat` shim/polyfill/replacement that works as far down as ES3.", | ||
"description": "An ES2019 spec-compliant `Array.prototype.flat` shim/polyfill/replacement that works as far down as ES3.", | ||
"license": "MIT", | ||
@@ -52,14 +55,14 @@ "main": "index.js", | ||
"define-properties": "^1.1.3", | ||
"es-abstract": "^1.15.0", | ||
"function-bind": "^1.1.1" | ||
"es-abstract": "^1.17.0-next.1" | ||
}, | ||
"devDependencies": { | ||
"@es-shims/api": "^2.1.2", | ||
"@ljharb/eslint-config": "^14.1.0", | ||
"@ljharb/eslint-config": "^15.0.2", | ||
"covert": "^1.1.1", | ||
"eslint": "^6.5.1", | ||
"eslint": "^6.7.2", | ||
"evalmd": "0.0.19", | ||
"function-bind": "^1.1.1", | ||
"nyc": "^10.3.2", | ||
"object-inspect": "^1.6.0", | ||
"safe-publish-latest": "^1.1.3", | ||
"object-inspect": "^1.7.0", | ||
"safe-publish-latest": "^1.1.4", | ||
"tape": "^4.11.0" | ||
@@ -90,3 +93,8 @@ }, | ||
"node": ">= 0.4" | ||
}, | ||
"greenkeeper": { | ||
"ignore": [ | ||
"nyc" | ||
] | ||
} | ||
} |
@@ -11,3 +11,3 @@ # array.prototype.flat <sup>[![Version Badge][npm-version-svg]][package-url]</sup> | ||
An ESnext spec-compliant `Array.prototype.flat` shim/polyfill/replacement that works as far down as ES3. | ||
An ES2019 spec-compliant `Array.prototype.flat` shim/polyfill/replacement that works as far down as ES3. | ||
@@ -14,0 +14,0 @@ This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the proposed [spec](https://tc39.github.io/proposal-flatMap/). |
Sorry, the diff of this file is not supported yet
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
2
18
113
14691
10
- Removedfunction-bind@^1.1.1
Updatedes-abstract@^1.17.0-next.1