{"_id":"handle-arguments","_rev":"3374089","name":"handle-arguments","description":"Get separately non-callback arguments in `.arguments` and the last argument if it [is-callback-function][] in `.callback`. It also works like [sliced][], but returns object with `.arguments` and `.callback` properties.","dist-tags":{"latest":"3.1.0"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"time":{"modified":"2024-08-26T02:59:48.000Z","created":"2015-01-21T02:32:04.588Z","3.1.0":"2016-05-04T03:53:32.227Z","3.0.4":"2015-09-09T00:18:29.095Z","3.0.3":"2015-09-09T00:07:14.720Z","3.0.2":"2015-05-25T16:01:03.607Z","3.0.1":"2015-05-09T00:38:15.761Z","3.0.0":"2015-05-08T23:01:17.757Z","2.0.0":"2015-01-28T05:00:29.990Z","1.0.4":"2015-01-26T03:47:58.352Z","1.0.3":"2015-01-26T01:55:50.042Z","1.0.2":"2015-01-21T04:03:08.270Z","1.0.1":"2015-01-21T02:32:04.588Z"},"users":{},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"repository":{"type":"git","url":"git+https://github.com/hybridables/handle-arguments.git"},"versions":{"3.1.0":{"name":"handle-arguments","version":"3.1.0","description":"Get separately non-callback arguments in `.arguments` and the last argument if it [is-callback-function][] in `.callback`. It also works like [sliced][], but returns object with `.arguments` and `.callback` properties.","repository":{"type":"git","url":"git+https://github.com/hybridables/handle-arguments.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"precommit.silent":true,"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"is-arguments":"^1.0.2","is-callback-function":"^1.0.0","is-number":"^2.1.0","isarray":"^1.0.0","lazy-cache":"^2.0.1","sliced":"^1.0.1"},"devDependencies":{"assertit":"^0.1.0","pre-commit":"*"},"files":["index.js","utils.js"],"keywords":["handle-arguments"],"verb":{"run":true,"toc":false,"layout":"empty","tasks":["readme"],"related":{"list":["get-fn-name","function-arguments","is-callback-function","is-async-function","parse-function","arr-includes","common-callback-names"]},"reflinks":["is-callback-function","sliced","in-array"],"lint":{"reflinks":true}},"gitHead":"b9eae010401fef07a6c0f3fbf1b633974ba1fb02","bugs":{"url":"https://github.com/hybridables/handle-arguments/issues"},"homepage":"https://github.com/hybridables/handle-arguments#readme","_id":"handle-arguments@3.1.0","_shasum":"0b72f08c3d8227bd241c025cbd8620ec30b28f45","_from":".","_npmVersion":"3.8.5","_nodeVersion":"5.8.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"dist":{"shasum":"0b72f08c3d8227bd241c025cbd8620ec30b28f45","size":5029,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-3.1.0.tgz"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/handle-arguments-3.1.0.tgz_1462334010970_0.3246346041560173"},"directories":{},"publish_time":1462334012227,"_hasShrinkwrap":false,"_cnpm_publish_time":1462334012227,"_cnpmcore_publish_time":"2021-12-16T19:21:54.914Z"},"3.0.4":{"name":"handle-arguments","version":"3.0.4","description":"Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow. Used by `hybridify`.","repository":{"type":"git","url":"git+https://github.com/hybridables/handle-arguments.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"is-arguments":"^1.0.1","sliced":"^1.0.1"},"devDependencies":{"assertit":"^0.1.0"},"files":["index.js"],"keywords":["api","apis","aplus","args","argument","arguments","bluebird","callback","callbacks","cb","handle","handle-callback","hybrid","hybrid-apis","hybridify","promise","promises","promises-aplus","then"],"gitHead":"a84a5c119a0a3f213b9782555162afb6e422b78b","bugs":{"url":"https://github.com/hybridables/handle-arguments/issues"},"homepage":"https://github.com/hybridables/handle-arguments#readme","_id":"handle-arguments@3.0.4","_shasum":"204ab5c7820bce75d0411791dca0f846b7e3cbf6","_from":".","_npmVersion":"3.2.2","_nodeVersion":"3.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"dist":{"shasum":"204ab5c7820bce75d0411791dca0f846b7e3cbf6","size":3980,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-3.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-3.0.4.tgz"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"directories":{},"publish_time":1441757909095,"_hasShrinkwrap":false,"_cnpm_publish_time":1441757909095,"_cnpmcore_publish_time":"2021-12-16T19:21:55.304Z"},"3.0.3":{"name":"handle-arguments","version":"3.0.3","description":"Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow. Used by `hybridify`.","repository":{"type":"git","url":"git+https://github.com/hybridables/handle-arguments.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"is-arguments":"^1.0.1","sliced":"^1.0.1"},"devDependencies":{"assertit":"^0.1.0"},"files":["index.js"],"keywords":["api","apis","aplus","args","argument","arguments","bluebird","callback","callbacks","cb","handle","handle-callback","hybrid","hybrid-apis","hybridify","promise","promises","promises-aplus","then"],"gitHead":"e8ebbeb7fe57008228928344816acac7828dae5b","bugs":{"url":"https://github.com/hybridables/handle-arguments/issues"},"homepage":"https://github.com/hybridables/handle-arguments#readme","_id":"handle-arguments@3.0.3","_shasum":"5865ea1e17658417744e26362cf02c87516d3268","_from":".","_npmVersion":"3.2.2","_nodeVersion":"3.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"dist":{"shasum":"5865ea1e17658417744e26362cf02c87516d3268","size":3949,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-3.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-3.0.3.tgz"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"directories":{},"publish_time":1441757234720,"_hasShrinkwrap":false,"_cnpm_publish_time":1441757234720,"_cnpmcore_publish_time":"2021-12-16T19:21:55.569Z"},"3.0.2":{"name":"handle-arguments","version":"3.0.2","description":"Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow.","repository":{"type":"git","url":"git+https://github.com/hybridables/handle-arguments.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"array-slice":"~0.2.3","manage-arguments":"~1.0.0"},"devDependencies":{"assertit":"^0.1.0"},"keywords":["api","apis","aplus","args","argument","arguments","bluebird","callback","callbacks","cb","handle","handle-callback","hybrid","hybrid-apis","hybridify","promise","promises","promises-aplus","then"],"gitHead":"982154154aa2b2a95ae5f6ba8ac68dd4f162ac1f","bugs":{"url":"https://github.com/hybridables/handle-arguments/issues"},"homepage":"https://github.com/hybridables/handle-arguments#readme","_id":"handle-arguments@3.0.2","_shasum":"62a147a88d703a3b75b4826ae16045ce2f0023d5","_from":".","_npmVersion":"2.10.0","_nodeVersion":"2.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"62a147a88d703a3b75b4826ae16045ce2f0023d5","size":5376,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-3.0.2.tgz"},"directories":{},"publish_time":1432569663607,"_hasShrinkwrap":false,"_cnpm_publish_time":1432569663607,"_cnpmcore_publish_time":"2021-12-16T19:21:55.809Z"},"3.0.1":{"name":"handle-arguments","version":"3.0.1","description":"Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow.","scripts":{"test":"standard && node test.js","travis":"standard && istanbul cover test.js --report lcovonly"},"author":{"name":"Charlike Mike Reagent","email":"mameto_100@mail.bg","url":"https://github.com/tunnckoCore"},"repository":{"type":"git","url":"git://github.com/hybridables/handle-arguments.git"},"keywords":["api","apis","aplus","args","argument","arguments","bluebird","callback","callbacks","cb","handle","handle-callback","hybrid","hybrid-apis","hybridify","promise","promises","promises-aplus","then"],"license":{"type":"MIT","url":"https://github.com/hybridables/handle-arguments/blob/master/LICENSE.md"},"dependencies":{"array-slice":"^0.2.2","is-arguments":"^1.0.0"},"devDependencies":{"assertit":"^0.1.0","istanbul":"^0.3.9","standard":"^3.7.3"},"gitHead":"c8f9c8426fda98a25276399e1191b2495b6be8c1","bugs":{"url":"https://github.com/hybridables/handle-arguments/issues"},"homepage":"https://github.com/hybridables/handle-arguments#readme","_id":"handle-arguments@3.0.1","_shasum":"3e9e0c0f508a5858fdf7381cfdebdac0914cf18c","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"3e9e0c0f508a5858fdf7381cfdebdac0914cf18c","size":4722,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-3.0.1.tgz"},"directories":{},"publish_time":1431131895761,"_hasShrinkwrap":false,"_cnpm_publish_time":1431131895761,"_cnpmcore_publish_time":"2021-12-16T19:21:56.031Z"},"3.0.0":{"name":"handle-arguments","version":"3.0.0","description":"Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow.","scripts":{"test":"standard && node test.js","travis":"standard && istanbul cover test.js --report lcovonly"},"author":{"name":"Charlike Mike Reagent","email":"mameto_100@mail.bg","url":"https://github.com/tunnckoCore"},"repository":{"type":"git","url":"git://github.com/hybridables/handle-arguments.git"},"keywords":["api","apis","aplus","args","argument","arguments","bluebird","callback","callbacks","cb","handle","handle-callback","hybrid","hybrid-apis","hybridify","promise","promises","promises-aplus","then"],"license":{"type":"MIT","url":"https://github.com/hybridables/handle-arguments/blob/master/LICENSE.md"},"dependencies":{"array-slice":"^0.2.2","is-arguments":"^1.0.0"},"devDependencies":{"assertit":"^0.1.0","istanbul":"^0.3.9","standard":"^3.7.3"},"gitHead":"25417142b27e1bd4cebf304fa3ae78d572542cd5","bugs":{"url":"https://github.com/hybridables/handle-arguments/issues"},"homepage":"https://github.com/hybridables/handle-arguments#readme","_id":"handle-arguments@3.0.0","_shasum":"31652b422f83f47bf12afd4df6fb2f60cac1cc71","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"31652b422f83f47bf12afd4df6fb2f60cac1cc71","size":4316,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-3.0.0.tgz"},"directories":{},"publish_time":1431126077757,"_hasShrinkwrap":false,"_cnpm_publish_time":1431126077757,"_cnpmcore_publish_time":"2021-12-16T19:21:56.251Z"},"2.0.0":{"name":"handle-arguments","version":"2.0.0","description":"Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow. Used in `hybridify`","scripts":{"lint":"jshint index.js && jscs index.js --reporter inline","test":"mocha","test-cov":"istanbul cover _mocha","test-travis":"istanbul cover _mocha --report lcovonly"},"author":{"name":"Charlike Make Reagent","email":"mameto_100@mail.bg","url":"https://github.com/tunnckoCore"},"repository":{"type":"git","url":"git://github.com/hybridables/handle-arguments.git"},"keywords":["api","apis","aplus","args","argument","arguments","bluebird","callback","callbacks","cb","handle","handle-callback","hybrid","hybrid-apis","hybridify","promise","promises","promises-aplus","then"],"license":{"type":"MIT","url":"https://github.com/hybridables/handle-arguments/blob/master/license.md"},"dependencies":{"array-slice":"^0.2.2","is-arguments":"^1.0.0"},"devDependencies":{"istanbul-harmony":"^0.3.1","mocha":"*","mocha-lcov-reporter":"^0.0.1"},"gitHead":"24eeafe718c8d640da80101a3f94132166b73fe2","bugs":{"url":"https://github.com/hybridables/handle-arguments/issues"},"homepage":"https://github.com/hybridables/handle-arguments","_id":"handle-arguments@2.0.0","_shasum":"c7342e6978c845855950f9b6d3abca147ab4dbec","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.11.14","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"c7342e6978c845855950f9b6d3abca147ab4dbec","size":5928,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-2.0.0.tgz"},"directories":{},"publish_time":1422421229990,"_hasShrinkwrap":false,"_cnpm_publish_time":1422421229990,"_cnpmcore_publish_time":"2021-12-16T19:21:56.480Z"},"1.0.4":{"name":"handle-arguments","version":"1.0.4","description":"Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow. Used in `hybridify`","scripts":{"lint":"jshint index.js && jscs index.js --reporter inline","test":"mocha","test-cov":"istanbul cover _mocha","test-travis":"istanbul cover _mocha --report lcovonly"},"author":{"name":"Charlike Make Reagent","email":"mameto_100@mail.bg","url":"https://github.com/tunnckoCore"},"repository":{"type":"git","url":"git://github.com/hybridables/handle-arguments.git"},"keywords":["api","apis","aplus","args","argument","arguments","bluebird","callback","callbacks","cb","handle","handle-callback","hybrid","hybrid-apis","hybridify","promise","promises","promises-aplus","then"],"license":{"type":"MIT","url":"https://github.com/hybridables/handle-arguments/blob/master/license.md"},"dependencies":{"array-slice":"^0.2.2","is-arguments":"^1.0.0"},"devDependencies":{"istanbul-harmony":"^0.3.1","mocha":"*","mocha-lcov-reporter":"^0.0.1"},"gitHead":"dae864715f3c83c9a2659034d84c474e8fdd9742","bugs":{"url":"https://github.com/hybridables/handle-arguments/issues"},"homepage":"https://github.com/hybridables/handle-arguments","_id":"handle-arguments@1.0.4","_shasum":"869f9b5e4359d2d6a269ac1d006002015f524c3e","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.11.14","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"869f9b5e4359d2d6a269ac1d006002015f524c3e","size":5537,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-1.0.4.tgz"},"directories":{},"publish_time":1422244078352,"deprecated":"Please upgrade to >=v2.0.0 - breaking change in v1.0.3 view more info: https://github.com/hybridables/handle-arguments/blob/master/history.md#v200--january-28-2015","_hasShrinkwrap":false,"_cnpm_publish_time":1422244078352,"_cnpmcore_publish_time":"2021-12-16T19:21:56.725Z"},"1.0.3":{"name":"handle-arguments","version":"1.0.3","description":"Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow. Used in `hybridify`","scripts":{"lint":"jshint index.js && jscs index.js --reporter inline","test":"mocha","test-cov":"istanbul cover _mocha","test-travis":"istanbul cover _mocha --report lcovonly"},"author":{"name":"Charlike Make Reagent","email":"mameto_100@mail.bg","url":"https://github.com/tunnckoCore"},"repository":{"type":"git","url":"git://github.com/tunnckoCore/handle-arguments.git"},"keywords":["api","apis","aplus","args","argument","arguments","bluebird","callback","callbacks","cb","handle","handle-callback","hybrid","hybrid-apis","hybridify","promise","promises","promises-aplus","then"],"license":{"type":"MIT","url":"https://github.com/tunnckoCore/handle-arguments/blob/master/license.md"},"dependencies":{"array-slice":"^0.2.2","is-arguments":"^1.0.0"},"devDependencies":{"istanbul-harmony":"^0.3.1","mocha":"*","mocha-lcov-reporter":"^0.0.1"},"gitHead":"da176a626ca74922e7488485c7f61cb99c6ca922","bugs":{"url":"https://github.com/tunnckoCore/handle-arguments/issues"},"homepage":"https://github.com/tunnckoCore/handle-arguments","_id":"handle-arguments@1.0.3","_shasum":"26d064679a7b2acf6d6fad77792b084934c661a2","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.11.14","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"26d064679a7b2acf6d6fad77792b084934c661a2","size":5510,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-1.0.3.tgz"},"directories":{},"publish_time":1422237350042,"deprecated":"Please upgrade to >=v2.0.0 - breaking change in v1.0.3 view more info: https://github.com/hybridables/handle-arguments/blob/master/history.md#v200--january-28-2015","_hasShrinkwrap":false,"_cnpm_publish_time":1422237350042,"_cnpmcore_publish_time":"2021-12-16T19:21:56.965Z"},"1.0.2":{"name":"handle-arguments","version":"1.0.2","description":"Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow. Used in `hybridify`","scripts":{"lint":"jshint index.js && jscs index.js --reporter inline","test":"mocha","test-cov":"istanbul cover _mocha","test-travis":"istanbul cover _mocha --report lcovonly"},"author":{"name":"Charlike Make Reagent","email":"mameto_100@mail.bg","url":"https://github.com/tunnckoCore"},"repository":{"type":"git","url":"git://github.com/tunnckoCore/handle-arguments.git"},"keywords":["api","apis","aplus","args","argument","arguments","bluebird","callback","callbacks","cb","handle","handle-callback","hybrid","hybrid-apis","hybridify","promise","promises","promises-aplus","then"],"license":{"type":"MIT","url":"https://github.com/tunnckoCore/handle-arguments/blob/master/license.md"},"dependencies":{"array-slice":"^0.2.2","is-arguments":"^1.0.0"},"devDependencies":{"istanbul-harmony":"^0.3.1","mocha":"*","mocha-lcov-reporter":"^0.0.1"},"gitHead":"3596b0b1bb6b771e0408aaba67ff032e489c1379","bugs":{"url":"https://github.com/tunnckoCore/handle-arguments/issues"},"homepage":"https://github.com/tunnckoCore/handle-arguments","_id":"handle-arguments@1.0.2","_shasum":"d2828fbdf97776bcf0638f082ed1bc663a524f57","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.11.14","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"d2828fbdf97776bcf0638f082ed1bc663a524f57","size":5312,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-1.0.2.tgz"},"directories":{},"publish_time":1421812988270,"deprecated":"Please upgrade to >=v2.0.0 - breaking change in v1.0.3 view more info: https://github.com/hybridables/handle-arguments/blob/master/history.md#v200--january-28-2015","_hasShrinkwrap":false,"_cnpm_publish_time":1421812988270,"_cnpmcore_publish_time":"2021-12-16T19:21:57.218Z"},"1.0.1":{"name":"handle-arguments","version":"1.0.1","description":"Handles given Arguments object - return separatly last argument (commonly callback) and other arguments as Array. Useful in node-style callback flow. Used in `hybridify`","scripts":{"lint":"jshint index.js && jscs index.js --reporter inline","test":"mocha","test-cov":"istanbul cover _mocha","test-travis":"istanbul cover _mocha --report lcovonly"},"author":{"name":"Charlike Make Reagent","email":"mameto_100@mail.bg","url":"https://github.com/tunnckoCore"},"repository":{"type":"git","url":"git://github.com/tunnckoCore/handle-arguments.git"},"keywords":[],"license":{"type":"MIT","url":"https://github.com/tunnckoCore/handle-arguments/blob/master/license.md"},"dependencies":{"array-slice":"^0.2.2","is-arguments":"^1.0.0"},"devDependencies":{"istanbul-harmony":"^0.3.1","mocha":"*","mocha-lcov-reporter":"^0.0.1"},"gitHead":"8b0a03f57296be029d1ca09636ab308b3323e102","bugs":{"url":"https://github.com/tunnckoCore/handle-arguments/issues"},"homepage":"https://github.com/tunnckoCore/handle-arguments","_id":"handle-arguments@1.0.1","_shasum":"cadc4af0a670552b5c530589d50aa1f275a9c016","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.11.14","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"cadc4af0a670552b5c530589d50aa1f275a9c016","size":5239,"noattachment":false,"key":"/handle-arguments/-/handle-arguments-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/handle-arguments/download/handle-arguments-1.0.1.tgz"},"directories":{},"publish_time":1421807524588,"deprecated":"Please upgrade to >=v2.0.0 - breaking change in v1.0.3 view more info: https://github.com/hybridables/handle-arguments/blob/master/history.md#v200--january-28-2015","_hasShrinkwrap":false,"_cnpm_publish_time":1421807524588,"_cnpmcore_publish_time":"2021-12-16T19:21:57.473Z"}},"readme":"# [handle-arguments][author-www-url] [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url] [![npm downloads][downloads-img]][downloads-url] \n\n> Get separately non-callback arguments in `.arguments` and the last argument if it [is-callback-function][] in `.callback`. It also works like [sliced][], but returns object with `.arguments` and `.callback` properties.\n\n[![code climate][codeclimate-img]][codeclimate-url] [![standard code style][standard-img]][standard-url] [![travis build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![dependency status][david-img]][david-url]\n\n## Install\n```\nnpm i handle-arguments --save\n```\n\n## Usage\n> For more use-cases see the [tests](./test.js)\n\n```js\nconst handleArguments = require('handle-arguments')\n```\n\n### [handleArguments](index.js#L55)\n> Get separately non-callback arguments in `.arguments`, and the last function if it [is-callback-function][] in `.callback`. Signature is like [sliced][], it works almost the same way, but returns object with `.arguments` and `.callback` properties.\n\n**Params**\n\n* `argz` **{Array|Arguments}**: Arguments object or array to eat.    \n* `names` **{Array|Number}**: If array directly passed to [is-callback-function][], otherwise to [sliced][].    \n* `index` **{Number}**: Passed directly to [sliced][] if `number`.    \n* `returns` **{Object}**  \n\n**Example**\n\n```js\nvar handle = require('handle-arguments')\n\nfunction fixture () {\n  return handle(arguments)\n}\n\nfunction cb () {}\nfunction noop () {}\n\nconsole.log(fixture(1, 2, 3, 4).arguments) // => [1, 2, 3, 4]\nconsole.log(fixture(1, 2, 3, 4).callback) // => false\n\nconsole.log(fixture(1, 2, cb).arguments) // => [1, 2]\nconsole.log(fixture(1, 2, cb).callback) // => [Function: cb]\n\nconsole.log(fixture(1, 2, noop).arguments) // => [1, 2, noop]\nconsole.log(fixture(1, 2, noop).callback) // => false\n\n// treat functions named `noop` or `foo` as callback\nfunction fn () {\n  return handle(arguments, ['foo', 'noop'])\n}\n\nconsole.log(fn(1, 2, 3, noop).arguments) // => [1, 2, 3]\nconsole.log(fn(1, 2, 3, noop).callback) // => [Function: noop]\n```\n\n### Instead of commonly used and wrong pattern\n> It is part of \"Optiomization Killers\" and needed very much, so we need correct pattern to reuse.\n \n```js\nfunction fixture () {\n  var args = [].slice.call(arguments)\n  var len = args.length\n  var callback = args[len - 1]\n\n  if (typeof callback === 'function') {\n    args = args.slice(0, -1)\n    callback.apply(null, [null].concat(args))\n  }\n  return args\n}\n```\n\n## Related\n* [arr-includes](https://www.npmjs.com/package/arr-includes): Return true if any of passed values exists in array. Using [in-array][]. | [homepage](https://github.com/tunnckocore/arr-includes)\n* [common-callback-names](https://www.npmjs.com/package/common-callback-names): List of common callback names - callback, cb, callback_, next, done. | [homepage](https://github.com/tunnckocore/common-callback-names)\n* [function-arguments](https://www.npmjs.com/package/function-arguments): Get arguments of a function, useful for and used in dependency injectors.… [more](https://www.npmjs.com/package/function-arguments) | [homepage](https://github.com/tunnckocore/function-arguments)\n* [get-fn-name](https://www.npmjs.com/package/get-fn-name): Get function name with strictness and correctness in mind. Also works for… [more](https://www.npmjs.com/package/get-fn-name) | [homepage](https://github.com/tunnckocore/get-fn-name)\n* [is-async-function](https://www.npmjs.com/package/is-async-function): Is function really asynchronous function? Trying to guess that based on check… [more](https://www.npmjs.com/package/is-async-function) | [homepage](https://github.com/tunnckocore/is-async-function)\n* [is-callback-function](https://www.npmjs.com/package/is-callback-function): Returns true if function is a callback. Checks its name is one… [more](https://www.npmjs.com/package/is-callback-function) | [homepage](https://github.com/tunnckocore/is-callback-function)\n* [parse-function](https://www.npmjs.com/package/parse-function): Parse a function, arrow function or string to object with name, args,… [more](https://www.npmjs.com/package/parse-function) | [homepage](https://github.com/tunnckocore/parse-function)\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/hybridables/handle-arguments/issues/new).  \nBut before doing anything, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines.\n\n## [Charlike Make Reagent](http://j.mp/1stW47C) [![new message to charlike][new-message-img]][new-message-url] [![freenode #charlike][freenode-img]][freenode-url]\n\n[![tunnckoCore.tk][author-www-img]][author-www-url] [![keybase tunnckoCore][keybase-img]][keybase-url] [![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url]\n\n[in-array]: https://github.com/jonschlinkert/in-array\n[is-callback-function]: https://github.com/tunnckocore/is-callback-function\n[sliced]: https://github.com/aheckmann/sliced\n\n[npmjs-url]: https://www.npmjs.com/package/handle-arguments\n[npmjs-img]: https://img.shields.io/npm/v/handle-arguments.svg?label=handle-arguments\n\n[license-url]: https://github.com/hybridables/handle-arguments/blob/master/LICENSE\n[license-img]: https://img.shields.io/npm/l/handle-arguments.svg\n\n[downloads-url]: https://www.npmjs.com/package/handle-arguments\n[downloads-img]: https://img.shields.io/npm/dm/handle-arguments.svg\n\n[codeclimate-url]: https://codeclimate.com/github/hybridables/handle-arguments\n[codeclimate-img]: https://img.shields.io/codeclimate/github/hybridables/handle-arguments.svg\n\n[travis-url]: https://travis-ci.org/hybridables/handle-arguments\n[travis-img]: https://img.shields.io/travis/hybridables/handle-arguments/master.svg\n\n[coveralls-url]: https://coveralls.io/r/hybridables/handle-arguments\n[coveralls-img]: https://img.shields.io/coveralls/hybridables/handle-arguments.svg\n\n[david-url]: https://david-dm.org/hybridables/handle-arguments\n[david-img]: https://img.shields.io/david/hybridables/handle-arguments.svg\n\n[standard-url]: https://github.com/feross/standard\n[standard-img]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n\n[author-www-url]: http://www.tunnckocore.tk\n[author-www-img]: https://img.shields.io/badge/www-tunnckocore.tk-fe7d37.svg\n\n[keybase-url]: https://keybase.io/tunnckocore\n[keybase-img]: https://img.shields.io/badge/keybase-tunnckocore-8a7967.svg\n\n[author-npm-url]: https://www.npmjs.com/~tunnckocore\n[author-npm-img]: https://img.shields.io/badge/npm-~tunnckocore-cb3837.svg\n\n[author-twitter-url]: https://twitter.com/tunnckoCore\n[author-twitter-img]: https://img.shields.io/badge/twitter-@tunnckoCore-55acee.svg\n\n[author-github-url]: https://github.com/tunnckoCore\n[author-github-img]: https://img.shields.io/badge/github-@tunnckoCore-4183c4.svg\n\n[freenode-url]: http://webchat.freenode.net/?channels=charlike\n[freenode-img]: https://img.shields.io/badge/freenode-%23charlike-5654a4.svg\n\n[new-message-url]: https://github.com/tunnckoCore/ama\n[new-message-img]: https://img.shields.io/badge/ask%20me-anything-green.svg","_attachments":{},"homepage":"https://github.com/hybridables/handle-arguments#readme","bugs":{"url":"https://github.com/hybridables/handle-arguments/issues"},"license":"MIT"}