{"_id":"switchy","_rev":"457478","name":"switchy","description":"Replace `switch` with switchy.","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"kchan","email":"kchanzen@gmail.com"}],"time":{"modified":"2024-06-20T07:39:35.000Z","created":"2016-08-19T17:21:33.761Z","0.1.0":"2016-08-19T17:21:33.761Z"},"users":{},"author":{"name":"EGOIST","email":"0x142857@gmail.com","url":"github.com/egoist"},"repository":{"type":"git","url":"git+https://github.com/egoist/switchy.git"},"versions":{"0.1.0":{"name":"switchy","version":"0.1.0","description":"Replace `switch` with switchy.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/egoist/switchy.git"},"author":{"name":"EGOIST","email":"0x142857@gmail.com","url":"github.com/egoist"},"engines":{"node":">=4"},"scripts":{"test":"npm run build && xo src/*.js && ava","build":"rolling src/index.js -o index.js"},"files":["index.js"],"keywords":[],"devDependencies":{"ava":"latest","xo":"latest"},"xo":{"semicolon":false,"space":2,"rules":{"operator-linebreak":[2,"before"]}},"gitHead":"bffe4e07b1e33f19ae6b01e260c691b6cdef8b5a","bugs":{"url":"https://github.com/egoist/switchy/issues"},"homepage":"https://github.com/egoist/switchy#readme","_id":"switchy@0.1.0","_shasum":"12dd810cf67281130ed3039cb8657ba682246e19","_from":".","_npmVersion":"3.10.5","_nodeVersion":"4.2.4","_npmUser":{"name":"kchan","email":"kchanzen@gmail.com"},"dist":{"shasum":"12dd810cf67281130ed3039cb8657ba682246e19","tarball":"http://registry-npm.ywwl.com/switchy/download/switchy-0.1.0.tgz","integrity":"sha512-xkhFsDG6gz8HP95D3IMtseKZ9Q7TWboVEgpkbc6jkOLI+sM6RFJ6XUerDNQSQSnvw84FpxqB9oD8ziQH2VIP5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJ3ym8o6nJey5w94zwFKFbsEHMtv9tBUKE+4w6vVYMCQIgXpK1l9W/x+0O3SY6fqb8ORybOQot1eY2X9u53wRqOfU="}],"size":1796,"noattachment":false,"key":"/switchy/-/switchy-0.1.0.tgz"},"maintainers":[{"name":"kchan","email":"kchanzen@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/switchy-0.1.0.tgz_1471627293526_0.08900207676924765"},"directories":{},"publish_time":1471627293761,"_cnpm_publish_time":1471627293761}},"readme":"<p align=\"center\">\n  <br>Replace <code>switch</code> with <strong>switchy</strong>. <br>http://chimera.labs.oreilly.com/books/1234000000262/apa.html#dont_use_switch\n</p>\n\n<p align=\"center\">\n  <a href=\"https://npmjs.com/package/switchy\"><img src=\"https://img.shields.io/npm/v/switchy.svg?style=flat-square\" alt=\"NPM version\"></a>\n  <a href=\"https://npmjs.com/package/switchy\"><img src=\"https://img.shields.io/npm/dm/switchy.svg?style=flat-square\" alt=\"NPM downloads\"></a>\n  <a href=\"https://circleci.com/gh/egoist/switchy\"><img src=\"https://img.shields.io/circleci/project/egoist/switchy/master.svg?style=flat-square\" alt=\"Build Status\"></a>\n</p>\n\n\n## Install\n\n```bash\n$ npm install --save switchy\n```\n\n## Usage\n\n```js\nconst switchy = require('switchy')\n\nconst chooseFruit = switchy({\n  apple() {\n    console.log('apple')\n  },\n  peach() {\n    console.log('peach')\n  },\n  default() {\n    console.log('no idea what you want')\n  }\n})\n\nchooseFruit('apple')\n//=> apple\nchooseFruit('watermelon')\n//=> no idea what you want\n```\n\n## License\n\nMIT © [EGOIST](https://github.com/egoist)\n","_attachments":{},"homepage":"https://github.com/egoist/switchy#readme","bugs":{"url":"https://github.com/egoist/switchy/issues"},"license":"MIT"}