UNPKG

@extra-array/flat-map.min

Version:

Flattens nested array, based on map function.

1 lines 1.05 kB
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).array_flatMap=e()}}(function(){return function(){return function e(n,r,t){function o(u,i){if(!r[u]){if(!n[u]){var a="function"==typeof require&&require;if(!i&&a)return a(u,!0);if(f)return f(u,!0);var d=new Error("Cannot find module '"+u+"'");throw d.code="MODULE_NOT_FOUND",d}var l=r[u]={exports:{}};n[u][0].call(l.exports,function(e){return o(n[u][1][e]||e)},l,l.exports,e,n,r,t)}return r[u].exports}for(var f="function"==typeof require&&require,u=0;u<t.length;u++)o(t[u]);return o}}()({1:[function(e,n,r){"use strict";function t(e){return e}function o(e){return Array.isArray(e)}function f(e,...n){for(var r of n)e.push(...r);return e}n.exports=function(e,n=null,r=null){n=n||t,r=r||o;var u=[],i=-1;for(var a of e){var d=n(a,++i,e);r(d,i,e)?f(u,d):u.push(d)}return u}},{}]},{},[1])(1)});