{"name":"array.prototype.flatten","version":"1.2.1","author":{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"},"contributors":[{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"}],"description":"An ESnext spec-compliant `Array.prototype.flatten` shim/polyfill/replacement that works as far down as ES3.","license":"MIT","main":"index.js","scripts":{"prepublish":"safe-publish-latest","pretest":"npm run --silent lint && evalmd README.md","test":"npm run --silent tests-only","posttest":"npm run --silent security","pretests-only":"es-shim-api --bound","tests-only":"npm run --silent test:shimmed && npm run --silent test:module","test:shimmed":"node test/shimmed","test:module":"node test","coverage":"nyc npm run tests-only","lint":"eslint test/*.js *.js","security":"nsp check"},"repository":{"type":"git","url":"git://github.com/es-shims/Array.prototype.flatten.git"},"keywords":["Array.prototype.flatten","flatten","array","ESnext","shim","polyfill","flatMap","Array.prototype.flatMap","es-shim API"],"dependencies":{"define-properties":"^1.1.2","es-abstract":"^1.10.0","function-bind":"^1.1.1"},"devDependencies":{"@es-shims/api":"^2.1.2","@ljharb/eslint-config":"^12.2.1","covert":"^1.1.0","eslint":"^4.18.1","evalmd":"^0.0.17","nsp":"^3.2.1","nyc":"^10.3.2","safe-publish-latest":"^1.1.1","tape":"^4.9.0"},"testling":{"files":["test/index.js","test/shimmed.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..6.0","firefox/15.0..latest","firefox/nightly","chrome/4.0..10.0","chrome/20.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2"]},"engines":{"node":">= 0.4"},"gitHead":"9439859905c409529d2a46a73900678825469cae","bugs":{"url":"https://github.com/es-shims/Array.prototype.flatten/issues"},"homepage":"https://github.com/es-shims/Array.prototype.flatten#readme","_id":"array.prototype.flatten@1.2.1","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"dist":{"integrity":"sha512-3GhsA78XgK//wQKbhUe6L93kknekGlTRY0kvYcpuSi0aa9rVrMr/okeIIv/XSpN8fZ5iUM+bWifhf2/7CYKtIg==","shasum":"a77ae1b64524ce373b137fade324d12040d3c680","tarball":"http://registry-npm.ywwl.com/array.prototype.flatten/download/array.prototype.flatten-1.2.1.tgz","fileCount":18,"unpackedSize":23987,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4K3sXINxiAXGV+RS486kshV5CN+XGXzRnmfjxUy8RnAiBEvY+kYdvPz5mUqrFPVUzltDRS3AUknYzRDVKptABYpQ=="}],"size":7357,"noattachment":false,"key":"/array.prototype.flatten/-/array.prototype.flatten-1.2.1.tgz"},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array.prototype.flatten_1.2.1_1519455808059_0.3400761020023444"},"_hasShrinkwrap":false,"deprecated":"This method has been renamed to \"flat\" - please use `array.prototype.flat` instead","readme":"# array.prototype.flatten <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![Build Status][travis-svg]][travis-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nAn ESnext spec-compliant `Array.prototype.flatten` shim/polyfill/replacement that works as far down as ES3.\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the proposed [spec](https://tc39.github.io/proposal-flatMap/).\n\nBecause `Array.prototype.flatten` depends on a receiver (the `this` value), the main export takes the array to operate on as the first argument.\n\n## Getting started\n\n```sh\nnpm install --save array.prototype.flatten\n```\n\n## Usage/Examples\n\n```js\nvar flatten = require('array.prototype.flatten');\nvar assert = require('assert');\n\nvar arr = [1, [2], [], 3, [[4]]];\n\nassert.deepEqual(flatten(arr, 1), [1, 2, 3, [4]]);\n```\n\n```js\nvar flatten = require('array.prototype.flatten');\nvar assert = require('assert');\n/* when Array#flatten is not present */\ndelete Array.prototype.flatten;\nvar shimmedFlatten = flatten.shim();\n\nassert.equal(shimmedFlatten, flatten.getPolyfill());\nassert.deepEqual(arr.flatten(), flatten(arr));\n```\n\n```js\nvar flatten = require('array.prototype.flatten');\nvar assert = require('assert');\n/* when Array#flatten is present */\nvar shimmedIncludes = flatten.shim();\n\nvar mapper = function (x) { return [x, 1]; };\n\nassert.equal(shimmedIncludes, Array.prototype.flatten);\nassert.deepEqual(arr.flatten(mapper), flatten(arr, mapper));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/array.prototype.flatten\n[npm-version-svg]: http://versionbadg.es/es-shims/Array.prototype.flatten.svg\n[travis-svg]: https://travis-ci.org/es-shims/Array.prototype.flatten.svg\n[travis-url]: https://travis-ci.org/es-shims/Array.prototype.flatten\n[deps-svg]: https://david-dm.org/es-shims/Array.prototype.flatten.svg\n[deps-url]: https://david-dm.org/es-shims/Array.prototype.flatten\n[dev-deps-svg]: https://david-dm.org/es-shims/Array.prototype.flatten/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Array.prototype.flatten#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/array.prototype.flatten.png?downloads=true&stars=true\n[license-image]: http://img.shields.io/npm/l/array.prototype.flatten.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/array.prototype.flatten.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=array.prototype.flatten\n","publish_time":1519455808135,"_cnpm_publish_time":1519455808135,"dist-tags":{"latest":"1.2.1"}}