{"_id":"as-typed-array","_rev":"220025","name":"as-typed-array","description":"Make any value an array, and maintain types","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"time":{"modified":"2021-06-03T15:39:26.000Z","created":"2020-09-20T21:33:50.003Z","1.0.0":"2020-09-20T21:33:50.003Z"},"users":{},"author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/as-typed-array.git"},"versions":{"1.0.0":{"name":"as-typed-array","version":"1.0.0","description":"Make any value an array, and maintain types","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/as-typed-array","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/as-typed-array.git"},"keywords":[],"main":"./build/index.js","scripts":{"build":"bob build","lint":"bob lint","postversion":"git push --tags","prepublishOnly":"yarn run lint && yarn run build && yarn run test","test":"jest"},"devDependencies":{"@bconnorwhite/bob":"^2.3.0","jest":"^26.4.2"},"eslintConfig":{"extends":"eslint-config-bob"},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"as-typed-array@1.0.0","dist":{"shasum":"c179ad70ff364ee10b6531c3e6b79f9b235e39ad","size":1341,"noattachment":false,"key":"/as-typed-array/-/as-typed-array-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/as-typed-array/download/as-typed-array-1.0.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/as-typed-array_1.0.0_1600637629908_0.39795849398145156"},"_hasShrinkwrap":false,"publish_time":1600637630003,"_cnpm_publish_time":1600637630003}},"readme":"<div align=\"center\">\n  <h1>as-typed-array</h1>\n  <a href=\"https://npmjs.com/package/as-typed-array\">\n    <img alt=\"npm\" src=\"https://img.shields.io/npm/v/as-typed-array.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/as-typed-array\">\n    <img alt=\"typescript\" src=\"https://img.shields.io/badge/TypeScript-%F0%9F%91%8D-blue.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/as-typed-array\">\n    <img alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/as-typed-array?label=Stars%20Appreciated%21&style=social\">\n  </a>\n  <a href=\"https://twitter.com/bconnorwhite\">\n    <img alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/bconnorwhite.svg?label=%40bconnorwhite&style=social\">\n  </a>\n</div>\n\n<br />\n\n> Make any value an array, and maintain types.\n\n## Installation\n\n```bash\nyarn add as-typed-array\n```\n\n```bash\nnpm install as-typed-array\n```\n<br />\n\n## API\n\n### Usage\n\n```ts\nimport asArray from \"as-typed-array\";\n\nasArray([\"ok\"]); // [\"ok\"]\n\nasArray(\"ok\"); // [\"ok\"]\n\nasArray({ ok: true }); // [{ ok: true }]\n\nasArray(undefined); // [];\n\n```\n\n### Types\n\n```ts\nimport asArray from \"as-typed-array\";\n\nfunction asArray<T>(any: (T | T[])): T[]\n\n```\n\n<br />\n\n<h2>Dev Dependencies<img align=\"right\" alt=\"David\" src=\"https://img.shields.io/david/dev/bconnorwhite/as-typed-array.svg\"></h2>\n\n- [@bconnorwhite/bob](https://www.npmjs.com/package/@bconnorwhite/bob): Bob is a toolkit for TypeScript projects\n- [jest](https://www.npmjs.com/package/jest): Delightful JavaScript Testing.\n\n<br />\n\n<h2>License <img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/as-typed-array.svg\"></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n","_attachments":{},"homepage":"https://connorwhite.org/github/as-typed-array","license":"MIT"}