UNPKG

array.prototype.flatmap

Version:

An ES2019 spec-compliant `Array.prototype.flatMap` shim/polyfill/replacement that works as far down as ES3.

20 lines (14 loc) 419 B
'use strict'; var define = require('define-properties'); var callBind = require('call-bind'); var implementation = require('./implementation'); var getPolyfill = require('./polyfill'); var polyfill = getPolyfill(); var shim = require('./shim'); var boundFlatMap = callBind(polyfill); define(boundFlatMap, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); module.exports = boundFlatMap;