Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 2, 2024 via pnpm

array.prototype.flatmap 1.3.2

An ES2019 spec-compliant `Array.prototype.flatMap` shim/polyfill/replacement that works as far down as ES3.
Package summary
Share
0
issues
1
license
67
MIT
Package created
1 Oct 2017
Version published
7 Sep 2023
Maintainers
1
Total deps
67
Direct deps
4
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
67 Packages, Including:
array-buffer-byte-length@1.0.1
array.prototype.flatmap@1.3.2
arraybuffer.prototype.slice@1.0.3
available-typed-arrays@1.0.7
call-bind@1.0.7
data-view-buffer@1.0.1
data-view-byte-length@1.0.1
data-view-byte-offset@1.0.0
define-data-property@1.1.4
define-properties@1.2.1
es-abstract@1.23.3
es-define-property@1.0.0
es-errors@1.3.0
es-object-atoms@1.0.0
es-set-tostringtag@2.0.3
es-shim-unscopables@1.0.2
es-to-primitive@1.2.1
for-each@0.3.3
function-bind@1.1.2
function.prototype.name@1.1.6
functions-have-names@1.2.3
get-intrinsic@1.2.4
get-symbol-description@1.0.2
globalthis@1.0.4
gopd@1.0.1
has-bigints@1.0.2
has-property-descriptors@1.0.2
has-proto@1.0.3
has-symbols@1.0.3
has-tostringtag@1.0.2
hasown@2.0.2
internal-slot@1.0.7
is-array-buffer@3.0.4
is-bigint@1.0.4
is-boolean-object@1.1.2
is-callable@1.2.7
is-data-view@1.0.1
is-date-object@1.0.5
is-negative-zero@2.0.3
is-number-object@1.0.7
is-regex@1.1.4
is-shared-array-buffer@1.0.3
is-string@1.0.7
is-symbol@1.0.4
is-typed-array@1.1.13
is-weakref@1.0.2
isarray@2.0.5
object-inspect@1.13.1
object-keys@1.1.1
object.assign@4.1.5
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
β“˜ This is a list of array.prototype.flatmap 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
call-bind1.0.721.6 kBMIT
prod
define-properties1.2.15.08 kBMIT
prod
es-abstract1.23.31 BMIT
prod
es-shim-unscopables1.0.24.31 kBMIT
prod

Visualizations

Frequently Asked Questions

What does array.prototype.flatmap do?

Array.prototype.flatMap is a JavaScript npm package that provides an ES2019 spec-compliant shim, polyfill, or replacement for the Array.prototype.flatMap method. This package works even in an ES3-supported environment. It is designed to flatten deeply nested arrays while also mapping each element to a new value, using a function that you provide.

How do you use array.prototype.flatmap?

To utilize array.prototype.flatmap, you need to install it via npm using command npm install --save array.prototype.flatmap. Typical example of its usage involves first requiring it in your JavaScript file via var flatMap = require('array.prototype.flatmap').

Here's a sample usage:

var flatMap = require('array.prototype.flatmap');
var assert = require('assert');

var arr = [1, [2], [], 3];

var results = flatMap(arr, function (x, i) {
	assert.equal(x, arr[i]);
	return x;
});

assert.deepEqual(results, [1, 2, 3]);

In this example, we create a simple function that returns each element of the array and then flatMap returns a new array with the returned results, but any nested arrays are flattened.

Where are the array.prototype.flatmap docs?

The complete documentation for array.prototype.flatmap is located within the package's GitHub page and can be found at https://github.com/es-shims/Array.prototype.flatMap, where you can find details about usage, test cases, and license information.