{"_id":"array-flat-polyfill","_rev":"2999926","name":"array-flat-polyfill","description":"A polyfill for Array.prototype.flat and Array.prototype.flatMap","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"time":{"modified":"2023-08-29T08:50:23.000Z","created":"2018-11-28T13:31:15.890Z","1.0.1":"2019-04-12T21:27:01.916Z","1.0.0":"2018-11-28T13:31:15.890Z"},"users":{},"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"repository":{"type":"git","url":"git+https://github.com/jonathantneal/array-flat-polyfill.git"},"versions":{"1.0.1":{"name":"array-flat-polyfill","version":"1.0.1","description":"A polyfill for Array.prototype.flat and Array.prototype.flatMap","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/jonathantneal/array-flat-polyfill.git"},"homepage":"https://github.com/jonathantneal/array-flat-polyfill#readme","bugs":{"url":"https://github.com/jonathantneal/array-flat-polyfill/issues"},"main":"index.js","module":"index.mjs","scripts":{"build":"rollup --config --silent","postbuild":"gzip-size index.js","prepublishOnly":"npm run test && npm run build","test":"npm run test:lint && npm run test:tape","test:lint":"eslint src/*.js --cache --ignore-path .gitignore --quiet","test:tape":"jest"},"engines":{"node":">=6.0.0"},"devDependencies":{"@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","babel-eslint":"^10.0.1","babel-jest":"^24.7.1","eslint":"^5.16.0","eslint-config-dev":"^2.0.0","gzip-size-cli":"^3.0.0","jest":"^24.7.1","rollup":"^1.10.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^4.0.4"},"eslintConfig":{"extends":"dev","parser":"babel-eslint","rules":{"no-unused-vars":[0]}},"keywords":["javascript","js","flat","flatMap","concat","flatten"],"dependencies":{},"gitHead":"362d855cb6ea2ef12f0676b116c5f9e4233b6f31","_id":"array-flat-polyfill@1.0.1","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"shasum":"1e3a4255be619dfbffbfd1d635c1cf357cd034e7","size":4491,"noattachment":false,"key":"/array-flat-polyfill/-/array-flat-polyfill-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-flat-polyfill/download/array-flat-polyfill-1.0.1.tgz"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-flat-polyfill_1.0.1_1555104421742_0.3276604496773552"},"_hasShrinkwrap":false,"publish_time":1555104421916,"_cnpm_publish_time":1555104421916,"_cnpmcore_publish_time":"2021-12-16T18:32:26.229Z"},"1.0.0":{"name":"array-flat-polyfill","version":"1.0.0","description":"A polyfill for Array.prototype.flat and Array.prototype.flatMap","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/jonathantneal/array-flat-polyfill.git"},"homepage":"https://github.com/jonathantneal/array-flat-polyfill#readme","bugs":{"url":"https://github.com/jonathantneal/array-flat-polyfill/issues"},"main":"index.js","module":"index.mjs","scripts":{"build":"rollup --config --silent","prepublish":"npm run build","test":"eslint src/*.js --cache --ignore-path .gitignore --quiet"},"engines":{"node":">=6.0.0"},"devDependencies":{"@babel/core":"^7.1.6","@babel/preset-env":"^7.1.6","babel-eslint":"^10.0.1","eslint":"^5.6.0","eslint-config-dev":"^2.0.0","rollup":"^0.67.3","rollup-plugin-babel":"^4.0.3","rollup-plugin-terser":"^3.0.0"},"eslintConfig":{"extends":"dev","parser":"babel-eslint","rules":{"no-unused-vars":[0]}},"keywords":["javascript","js","flat","flatMap","concat","flatten"],"gitHead":"5f8b43bd86b3435c499bc304a92dfef6229aaab1","_id":"array-flat-polyfill@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"11.1.0","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"9c6c0070f5700f0e2f657fdc60da0c131b864759","size":4303,"noattachment":false,"key":"/array-flat-polyfill/-/array-flat-polyfill-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-flat-polyfill/download/array-flat-polyfill-1.0.0.tgz"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-flat-polyfill_1.0.0_1543411875718_0.27454974783415476"},"_hasShrinkwrap":false,"publish_time":1543411875890,"_cnpm_publish_time":1543411875890,"_cnpmcore_publish_time":"2021-12-16T18:32:26.456Z"}},"readme":"# Array Flat Polyfill [<img src=\"http://jonathantneal.github.io/js-logo.svg\" alt=\"\" width=\"90\" height=\"90\" align=\"right\">][Array Flat Polyfill]\n\n[![NPM Version][npm-img]][npm-url]\n[![Build Status][cli-img]][cli-url]\n[![Support Chat][git-img]][git-url]\n\n[Array Flat Polyfill] is a polyfill for `Array.prototype.flat` and\n`Array.prototype.flatMap`, following the [TC39 Proposal].\n\n```sh\nnpm install array-flat-polyfill --save\n```\n\nThe `flat()` method creates a new array with all sub-array elements\nconcatenated into it recursively up to the specified depth.\n\n```js\n[1, 2, [3, 4, [5, 6]]].flat(2) // [1, 2, 3, 4, 5, 6]\n```\n\nThe `flatMap()` method maps each element using a mapping function, then\nflattens the result into a new array.\n\n```js\n[1, 2, 3, 4].flatMap(x => [x * 2]); // [2, 4, 6, 8]\n```\n\nThe script is 261 bytes when minified and gzipped. It works in all browsers,\ngoing as far back as Internet Explorer 9.\n\n## Usage\n\nFor immediate usage, add this script to your document:\n\n```html\n<script src=\"https://unpkg.com/array-flat-polyfill\"></script>\n```\n\nFor Node usage, add [Array Flat Polyfill] to your project:\n\n```sh\nnpm install array-flat-polyfill\n```\n\nInclude [Array Flat Polyfill] in your JS:\n\n```js\nimport 'array-flat-polyfill';\n```\n\n[cli-img]: https://img.shields.io/travis/jonathantneal/array-flat-polyfill/master.svg\n[cli-url]: https://travis-ci.org/jonathantneal/array-flat-polyfill\n[git-img]: https://img.shields.io/badge/support-chat-blue.svg\n[git-url]: https://gitter.im/postcss/postcss\n[npm-img]: https://img.shields.io/npm/v/array-flat-polyfill.svg\n[npm-url]: https://www.npmjs.com/package/array-flat-polyfill\n\n[Array Flat Polyfill]: https://github.com/jonathantneal/array-flat-polyfill\n[TC39 Proposal]: https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flat\n","_attachments":{},"homepage":"https://github.com/jonathantneal/array-flat-polyfill#readme","bugs":{"url":"https://github.com/jonathantneal/array-flat-polyfill/issues"},"license":"CC0-1.0"}