{"name":"array-back","author":{"name":"Lloyd Brookes","email":"opensource@75lb.com"},"version":"6.2.3","description":"Guarantees an array back","repository":{"type":"git","url":"git+https://github.com/75lb/array-back.git"},"license":"MIT","exports":{"import":"./index.js","require":"./dist/index.cjs"},"type":"module","keywords":["to","convert","return","array","arrayify"],"engines":{"node":">=12.17"},"scripts":{"test":"npm run dist && npm run test:ci","test:ci":"75lb-nature test-runner test.js","docs":"75lb-nature jsdoc2md -t README.hbs index.js > README.md","dist":"75lb-nature cjs-build index.js"},"devDependencies":{},"gitHead":"28e66ae2cee8a46d8e99eb3459d166376e73f0ba","_id":"array-back@6.2.3","bugs":{"url":"https://github.com/75lb/array-back/issues"},"homepage":"https://github.com/75lb/array-back#readme","_nodeVersion":"25.0.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-SGDvmg6QTYiTxCBkYVmThcoa67uLl35pyzRHdpCGBOcqFy6BtwnphoFPk7LhJshD+Yk1Kt35WGWeZPTgwR4Fhw==","shasum":"d41e67598805e614f23b319b9e5960dfbcd72ae2","tarball":"http://registry-npm.ywwl.com/array-back/download/array-back-6.2.3.tgz","fileCount":7,"unpackedSize":9647,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEarnayr00VCMH1txGWC2lrMxAparWfkSnVW1grEf5JjAiEAyEhYldxTMCKEEuEIehEP/l74TH5knDFiyvtvuNad0/g="}],"size":2675,"noattachment":false,"key":"/array-back/-/array-back-6.2.3.tgz"},"_npmUser":{"name":"75lb","email":"opensource@75lb.com"},"directories":{},"maintainers":[{"name":"75lb","email":"opensource@75lb.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/array-back_6.2.3_1773936478758_0.28354710499183544"},"_hasShrinkwrap":false,"readme":"[![view on npm](https://badgen.net/npm/v/array-back)](https://www.npmjs.org/package/array-back)\n[![npm module downloads](https://badgen.net/npm/dt/array-back)](https://www.npmjs.org/package/array-back)\n[![Gihub repo dependents](https://badgen.net/github/dependents-repo/75lb/array-back)](https://github.com/75lb/array-back/network/dependents?dependent_type=REPOSITORY)\n[![Gihub package dependents](https://badgen.net/github/dependents-pkg/75lb/array-back)](https://github.com/75lb/array-back/network/dependents?dependent_type=PACKAGE)\n[![Node.js CI](https://github.com/75lb/array-back/actions/workflows/node.js.yml/badge.svg)](https://github.com/75lb/array-back/actions/workflows/node.js.yml)\n\n<a name=\"module_array-back\"></a>\n\n## array-back\nTakes any input and guarantees an array back.\n\n- Converts array-like objects (e.g. `arguments`, `Set`) to a real array.\n- Converts `undefined` to an empty array.\n- Converts any another other, singular value (including `null`, objects and iterables other than `Set`) into an array containing that value.\n- Ignores input which is already an array.\n\n**Example**  \n```js\n> const arrayify = require('array-back')\n\n> arrayify(undefined)\n[]\n\n> arrayify(null)\n[ null ]\n\n> arrayify(0)\n[ 0 ]\n\n> arrayify([ 1, 2 ])\n[ 1, 2 ]\n\n> arrayify(new Set([ 1, 2 ]))\n[ 1, 2 ]\n\n> function f(){ return arrayify(arguments); }\n> f(1,2,3)\n[ 1, 2, 3 ]\n```\n<a name=\"exp_module_array-back--arrayify\"></a>\n\n### arrayify(input) ⇒ <code>Array</code> ⏏\n**Kind**: Exported function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input value to convert to an array |\n\n\n### Load anywhere\n\nThis library is compatible with Node.js, the Web and any style of module loader. It can be loaded anywhere, natively without transpilation.\n\nNode.js:\n\n```js\nconst arrayify = require('array-back')\n```\n\nWithin Node.js with ECMAScript Module support enabled:\n\n```js\nimport arrayify from 'array-back'\n```\n\nWithin an modern browser ECMAScript Module:\n\n```js\nimport arrayify from './node_modules/array-back/index.js'\n```\n\n* * *\n\n&copy; 2015-26 [Lloyd Brookes](https://github.com/75lb) \\<opensource@75lb.com\\>.\n\nDocumented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","publish_time":1773936478911,"_cnpm_publish_time":1773936478911,"dist-tags":{"latest":"6.2.3"}}