{"_id":"sweep","_rev":"4-d865dc279275a2e11fc2e0d35cdcfc03","name":"sweep","description":"partial spread operator implementation","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"sweep","version":"0.1.0","description":"partial spread operator implementation","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/bredele/sweep.git"},"keywords":["spread","array","push","arguments"],"author":{"name":"Olivier Wietrich","email":"olivier.wietrich@gmail.com","url":"http://github.com/bredele"},"license":"MIT","bugs":{"url":"https://github.com/bredele/sweep/issues"},"homepage":"https://github.com/bredele/sweep","devDependencies":{"mocha":"^1.21.1"},"_id":"sweep@0.1.0","dist":{"shasum":"49783170e125f9a04c732f4b459a3ade4b61247b","tarball":"https://registry.npmjs.org/sweep/-/sweep-0.1.0.tgz","integrity":"sha512-DVzGo4SyfpwLd+DiyZ6PpC3gdjQ+jo+ZYjBQ3DQTImgtZI/m0JjMwyqr5eQjLtz4pDp02b4pGgIzYIDxCYOqAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsg1xB2gww2drdxEXveiSDIhAYy9YJNGk+levx0/vGtgIgCLkaTj/C4E8LuBCY7loCJ0xS+1NxYScGs26f81wIJs4="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"bredele","email":"olivier.wietrich@gmail.com"},"maintainers":[{"name":"bredele","email":"olivier.wietrich@gmail.com"}]}},"readme":"sweep\n=====\n\n  Sweep allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) are expected. \n\n  Sweep is a partial implementation of the **spread** operator, part of the Harmony ECMSScript 6 proposal.\n\n\n## Installation\n\ncomponent:\n\n    $ component install bredele/sweep\n\nnodejs:\n\n    $ npm install sweep\n\n\n## Usage\n\n## a better apply\n\n```js\nvar args = [0, 1, 2];\nvar cb = sweep(function(x, y, z) {\n\t// do something with x, y, z\n});\ncb(args);\n```\n\n## to array\n\n```js\n\nfunction() {\n  var arr = spread(arguments);\n  // arr is an array\n};\n```\n\n## a better push\n\n```js\nvar arr1 = [0, 1];\nvar arr2 = [3, 4];\n\nvar result = spread(arr1, 2, arr2);\n// => [0, 1, 2, 3, 4];\n```\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Olivier Wietrich <olivier.wietrich@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"name":"bredele","email":"olivier.wietrich@gmail.com"}],"time":{"modified":"2022-06-27T02:53:08.174Z","created":"2014-07-27T19:24:36.575Z","0.1.0":"2014-07-27T19:24:36.575Z"},"homepage":"https://github.com/bredele/sweep","keywords":["spread","array","push","arguments"],"repository":{"type":"git","url":"https://github.com/bredele/sweep.git"},"author":{"name":"Olivier Wietrich","email":"olivier.wietrich@gmail.com","url":"http://github.com/bredele"},"bugs":{"url":"https://github.com/bredele/sweep/issues"},"license":"MIT","readmeFilename":"README.md"}