{"_id":"simple-swizzle","_rev":"1705142","name":"simple-swizzle","description":"Simply swizzle your arguments","dist-tags":{"latest":"0.2.4"},"maintainers":[{"name":"qix","email":"npm@josh.junon.me"}],"time":{"modified":"2026-11-09T15:52:29.000Z","created":"2016-01-20T16:04:26.061Z","0.2.4":"2025-09-13T16:19:21.071Z","0.2.2":"2016-11-16T02:32:21.061Z","0.2.1":"2016-01-23T18:00:09.061Z","0.2.0":"2016-01-21T20:43:28.709Z","0.1.0":"2016-01-20T16:04:26.061Z"},"users":{"flumpus-dev":true},"author":{"name":"Qix","url":"http://github.com/qix-"},"repository":{"type":"git","url":"git+https://github.com/qix-/node-simple-swizzle.git"},"versions":{"0.2.4":{"name":"simple-swizzle","description":"Simply swizzle your arguments","version":"0.2.4","author":{"name":"Qix","url":"http://github.com/qix-"},"keywords":["argument","arguments","swizzle","swizzling","parameter","parameters","mixed","array"],"license":"MIT","scripts":{"pretest":"xo","test":"mocha --compilers coffee:coffee-script/register"},"repository":{"type":"git","url":"git+https://github.com/qix-/node-simple-swizzle.git"},"devDependencies":{"coffee-script":"^1.9.3","coveralls":"^2.11.2","istanbul":"^0.3.17","mocha":"^2.2.5","should":"^7.0.1","xo":"^0.7.1"},"dependencies":{"is-arrayish":"^0.3.1"},"_id":"simple-swizzle@0.2.4","gitHead":"eb4f9b11182126927dcdc90149a41126c4b846c2","bugs":{"url":"https://github.com/qix-/node-simple-swizzle/issues"},"homepage":"https://github.com/qix-/node-simple-swizzle#readme","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==","shasum":"a8d11a45a11600d6a1ecdff6363329e3648c3667","tarball":"http://registry-npm.ywwl.com/simple-swizzle/download/simple-swizzle-0.2.4.tgz","fileCount":4,"unpackedSize":4091,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAa8rUxobcinhs080KirYVHQkqRoF79SKl3LmgMsvIsZAiEA8G2neI5S8jg8VPxz+h9HoRr7yoA/sYGWjvtjcaRUuM8="}],"size":2219,"noattachment":false,"key":"/simple-swizzle/-/simple-swizzle-0.2.4.tgz"},"_npmUser":{"name":"qix","email":"npm@josh.junon.me"},"directories":{},"maintainers":[{"name":"qix","email":"npm@josh.junon.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/simple-swizzle_0.2.4_1757780360883_0.6346575433013992"},"_hasShrinkwrap":false,"publish_time":1757780361071,"_cnpm_publish_time":1757780361071},"0.2.2":{"name":"simple-swizzle","description":"Simply swizzle your arguments","version":"0.2.2","author":{"name":"Qix","url":"http://github.com/qix-"},"keywords":["argument","arguments","swizzle","swizzling","parameter","parameters","mixed","array"],"license":"MIT","scripts":{"pretest":"xo","test":"mocha --compilers coffee:coffee-script/register"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/qix-/node-simple-swizzle.git"},"devDependencies":{"coffee-script":"^1.9.3","coveralls":"^2.11.2","istanbul":"^0.3.17","mocha":"^2.2.5","should":"^7.0.1","xo":"^0.7.1"},"dependencies":{"is-arrayish":"^0.3.1"},"gitHead":"54cfffdb7c115c4fc52ce7c2f2af9f6351091c88","bugs":{"url":"https://github.com/qix-/node-simple-swizzle/issues"},"homepage":"https://github.com/qix-/node-simple-swizzle#readme","_id":"simple-swizzle@0.2.2","_shasum":"a4da6b635ffcccca33f70d17cb92592de95e557a","_from":".","_npmVersion":"2.14.2","_nodeVersion":"0.10.32","_npmUser":{"name":"qix","email":"i.am.qix@gmail.com"},"dist":{"shasum":"a4da6b635ffcccca33f70d17cb92592de95e557a","tarball":"http://registry-npm.ywwl.com/simple-swizzle/download/simple-swizzle-0.2.2.tgz","integrity":"sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCihe2Cv6GPkasI/vPaUeY7vnHjdvuZucIx3f36lWbOdgIhAOIIKyJx4tkS/EXkipGMHRN//R6M9vTPFCioaKjG1ZxI"}],"size":1920,"noattachment":false,"key":"/simple-swizzle/-/simple-swizzle-0.2.2.tgz"},"maintainers":[{"name":"qix","email":"i.am.qix@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/simple-swizzle-0.2.2.tgz_1479263539219_0.0007823384366929531"},"directories":{},"publish_time":1479263541061,"_cnpm_publish_time":1479263541061},"0.2.1":{"name":"simple-swizzle","description":"Simply swizzle your arguments","version":"0.2.1","author":{"name":"Qix","url":"http://github.com/qix-"},"keywords":["argument","arguments","swizzle","swizzling","parameter","parameters","mixed","array"],"license":"MIT","scripts":{"pretest":"xo","test":"mocha --compilers coffee:coffee-script/register"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/qix-/node-simple-swizzle.git"},"devDependencies":{"coffee-script":"^1.9.3","coveralls":"^2.11.2","istanbul":"^0.3.17","mocha":"^2.2.5","should":"^7.0.1","xo":"^0.7.1"},"dependencies":{"is-arrayish":"^0.3.0"},"gitHead":"db713f065bbe7eeb33f31ca449990b0bdbe9caec","bugs":{"url":"https://github.com/qix-/node-simple-swizzle/issues"},"homepage":"https://github.com/qix-/node-simple-swizzle#readme","_id":"simple-swizzle@0.2.1","_shasum":"3a0cfc11c9cc2be7eb30ea432412353594d7001a","_from":".","_npmVersion":"3.3.6","_nodeVersion":"4.1.1","_npmUser":{"name":"qix","email":"i.am.qix@gmail.com"},"dist":{"shasum":"3a0cfc11c9cc2be7eb30ea432412353594d7001a","tarball":"http://registry-npm.ywwl.com/simple-swizzle/download/simple-swizzle-0.2.1.tgz","integrity":"sha512-QPvz/OBK50yFPR+/HuuFdvOLirr8fEqGL1KoB2lmd3pBmOCxAqReXE8O3oxSyuCbgbDcN+Ac/N55LyTK6CnmkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpaYWX6u4TsWnh1MvYkibAuV858n9S6EQ4q1x6PLKcLwIhAPfFALd+6zrwAdTsHf46rsdzGNJ8FuTvl5YfKye86Tv3"}],"size":1929,"noattachment":false,"key":"/simple-swizzle/-/simple-swizzle-0.2.1.tgz"},"maintainers":[{"name":"qix","email":"i.am.qix@gmail.com"}],"directories":{},"publish_time":1453572009061,"_cnpm_publish_time":1453572009061},"0.2.0":{"name":"simple-swizzle","description":"Simply swizzle your arguments","version":"0.2.0","author":{"name":"Qix","url":"http://github.com/qix-"},"keywords":["argument","arguments","swizzle","swizzling","parameter","parameters","mixed","array"],"license":"MIT","scripts":{"pretest":"xo","test":"mocha --compilers coffee:coffee-script/register"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/qix-/node-simple-swizzle.git"},"devDependencies":{"coffee-script":"^1.9.3","coveralls":"^2.11.2","istanbul":"^0.3.17","mocha":"^2.2.5","should":"^7.0.1","xo":"^0.7.1"},"bugs":{"url":"https://github.com/qix-/node-simple-swizzle/issues"},"homepage":"https://github.com/qix-/node-simple-swizzle#readme","_id":"simple-swizzle@0.2.0","_shasum":"13a36dc43a8dad7ec4e64f7875cc82c0b69787ba","_from":".","_npmVersion":"3.3.6","_nodeVersion":"4.1.1","_npmUser":{"name":"qix","email":"i.am.qix@gmail.com"},"dist":{"shasum":"13a36dc43a8dad7ec4e64f7875cc82c0b69787ba","tarball":"http://registry-npm.ywwl.com/simple-swizzle/download/simple-swizzle-0.2.0.tgz","integrity":"sha512-a2bunJuYYiPh7euz7dQzDkrSqmhJNE6i2e2Er9K5xjS0vhc0tXnTPZjgAqtTT7LVEyt7VGFpGwTWqfmAyyCHnQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIALSVvzUAztXWGSi2xMprDXiiDHEaJk2i3xvqB0r0amAAiA2XL49ae6K3y5t0An4iToNjdgqZGrcJO6X1tUYzTO+Yw=="}],"size":1942,"noattachment":false,"key":"/simple-swizzle/-/simple-swizzle-0.2.0.tgz"},"maintainers":[{"name":"qix","email":"i.am.qix@gmail.com"}],"deprecated":"fixed incorrect string handling in 0.2.1","directories":{},"publish_time":1453409008709,"_cnpm_publish_time":1453409008709},"0.1.0":{"name":"simple-swizzle","description":"Simply swizzle your arguments","version":"0.1.0","author":{"name":"Qix","url":"http://github.com/qix-"},"keywords":["argument","arguments","swizzle","swizzling","parameter","parameters","mixed","array"],"license":"MIT","scripts":{"pretest":"xo","test":"mocha --compilers coffee:coffee-script/register"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/qix-/node-simple-swizzle.git"},"devDependencies":{"coffee-script":"^1.9.3","coveralls":"^2.11.2","istanbul":"^0.3.17","mocha":"^2.2.5","should":"^7.0.1","xo":"^0.7.1"},"gitHead":"cf1677cf0ebc219b3770cabd226362bfbe4b920f","bugs":{"url":"https://github.com/qix-/node-simple-swizzle/issues"},"homepage":"https://github.com/qix-/node-simple-swizzle#readme","_id":"simple-swizzle@0.1.0","_shasum":"b7a23842bf04d89bd2d58b1c46f686b32cbb0e5e","_from":".","_npmVersion":"3.3.6","_nodeVersion":"4.1.1","_npmUser":{"name":"qix","email":"i.am.qix@gmail.com"},"dist":{"shasum":"b7a23842bf04d89bd2d58b1c46f686b32cbb0e5e","tarball":"http://registry-npm.ywwl.com/simple-swizzle/download/simple-swizzle-0.1.0.tgz","integrity":"sha512-eDMQUN4r95byT0izGBGwK9YLt2jUIXv6IoKmUS6kDeqi9EedXUz/jfIt2IO4wTdkVaGWDZD9Y66SjZ2eJpfO3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGA6OTPj87mGp9r5GaoZgj+TdHOal5XEbAvpdePvHgkiAiEAofwXPkCr5thM24VeNjhpuWqV35TgknacWd4bb/eab6o="}],"size":1818,"noattachment":false,"key":"/simple-swizzle/-/simple-swizzle-0.1.0.tgz"},"maintainers":[{"name":"qix","email":"i.am.qix@gmail.com"}],"deprecated":"fixed incorrect string handling in 0.2.1","directories":{},"publish_time":1453305866061,"_cnpm_publish_time":1453305866061}},"readme":"> **NOTE:** ⚠️ **Don't use this package in new projects.** It is a **huge anti-pattern** and will only confuse and annoy people who use whatever code you write with it. I wrote this in a time when Javascript and Node.js were still pretty experimental and clever things like this weren't frowned upon. I've also learned a LOT about proper API design since I wrote this package. DO. NOT. USE. THIS. PACKAGE. If you're reaching for it, please *really* reconsider your API's design.\n\n---\n\n# simple-swizzle [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-simple-swizzle.svg?style=flat-square)](https://travis-ci.org/Qix-/node-simple-swizzle) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-simple-swizzle.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-simple-swizzle)\n\n> [Swizzle](https://en.wikipedia.org/wiki/Swizzling_(computer_graphics)) your function arguments; pass in mixed arrays/values and get a clean array\n\n## Usage\n\n```js\nvar swizzle = require('simple-swizzle');\n\nfunction myFunc() {\n\tvar args = swizzle(arguments);\n\t// ...\n\treturn args;\n}\n\nmyFunc(1, [2, 3], 4); // [1, 2, 3, 4]\nmyFunc(1, 2, 3, 4);   // [1, 2, 3, 4]\nmyFunc([1, 2, 3, 4]); // [1, 2, 3, 4]\n```\n\nFunctions can also be wrapped to automatically swizzle arguments and be passed\nthe resulting array.\n\n```js\nvar swizzle = require('simple-swizzle');\n\nvar swizzledFn = swizzle.wrap(function (args) {\n\t// ...\n\treturn args;\n});\n\nswizzledFn(1, [2, 3], 4); // [1, 2, 3, 4]\nswizzledFn(1, 2, 3, 4);   // [1, 2, 3, 4]\nswizzledFn([1, 2, 3, 4]); // [1, 2, 3, 4]\n```\n\n## License\nLicensed under the [MIT License](http://opensource.org/licenses/MIT).\nYou can find a copy of it in [LICENSE](LICENSE).\n","_attachments":{},"homepage":"https://github.com/qix-/node-simple-swizzle#readme","bugs":{"url":"https://github.com/qix-/node-simple-swizzle/issues"},"license":"MIT"}