Socket
Socket
Sign inDemoInstall

array.prototype.flatmap

Package Overview
Dependencies
65
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.2 to 1.2.3

.github/workflows/rebase.yml

9

CHANGELOG.md

@@ -0,1 +1,10 @@

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] add `funding` field
* [Tests] use shared travis-ci configs
* [actions] add automatic rebasing / merge commit blocking
1.2.2 / 2019-10-10

@@ -2,0 +11,0 @@ =================

17

implementation.js
'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 IsCallable = require('es-abstract/2019/IsCallable');
var ToLength = require('es-abstract/2019/ToLength');
var ToObject = require('es-abstract/2019/ToObject');
module.exports = function flatMap(mapperFunction) {
var O = ES.ToObject(this);
var sourceLen = ES.ToLength(ES.Get(O, 'length'));
var O = ToObject(this);
var sourceLen = ToLength(Get(O, 'length'));
if (!ES.IsCallable(mapperFunction)) {
if (!IsCallable(mapperFunction)) {
throw new TypeError('mapperFunction must be a function');

@@ -18,5 +23,5 @@ }

var A = ES.ArraySpeciesCreate(O, 0);
ES.FlattenIntoArray(A, O, sourceLen, 0, 1, mapperFunction, T);
var A = ArraySpeciesCreate(O, 0);
FlattenIntoArray(A, O, sourceLen, 0, 1, mapperFunction, T);
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 boundFlatMap = bind.call(Function.call, polyfill);
var boundFlatMap = callBind(polyfill);

@@ -14,0 +14,0 @@ define(boundFlatMap, {

{
"name": "array.prototype.flatmap",
"version": "1.2.2",
"version": "1.2.3",
"author": {

@@ -9,2 +9,5 @@ "name": "Jordan Harband",

},
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"contributors": [

@@ -49,3 +52,3 @@ {

"define-properties": "^1.1.3",
"es-abstract": "^1.15.0",
"es-abstract": "^1.17.0-next.1",
"function-bind": "^1.1.1"

@@ -55,10 +58,10 @@ },

"@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",
"foreach": "^2.0.5",
"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"

@@ -89,3 +92,8 @@ },

"node": ">= 0.4"
},
"greenkeeper": {
"ignore": [
"nyc"
]
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc