{"_id":"auto-curry","_rev":"10-ee5792d054bbf3356083c8d57e72acbb","name":"auto-curry","description":"Supercharge your functions by giving them the ability to auto-curry","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"auto-curry","version":"0.1.0","description":"Supercharge your functions by giving them the ability to auto-curry","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["curry","auto","functional","function","currying"],"author":{"name":"Mudit Ameta"},"license":"MIT","repository":{"type":"git","url":"https://github.com/zeusdeux/auto-curry"},"bugs":{"url":"https://github.com/zeusdeux/auto-curry/issues"},"homepage":"https://github.com/zeusdeux/auto-curry","gitHead":"2219bc57ece4ec58153023a40f888160c72de8e9","_id":"auto-curry@0.1.0","_shasum":"9bec32a5c6be9ef3ac579cf603a2f1c72c66b2f4","_from":".","_npmVersion":"1.4.24","_npmUser":{"name":"zeusdeux","email":"zeusdeux@gmail.com"},"maintainers":[{"name":"zeusdeux","email":"zeusdeux@gmail.com"}],"dist":{"shasum":"9bec32a5c6be9ef3ac579cf603a2f1c72c66b2f4","tarball":"https://registry.npmjs.org/auto-curry/-/auto-curry-0.1.0.tgz","integrity":"sha512-WFuDabL4BGfPUm6r82t4RX4KqeKInRYpfvgXb7vtXqmRp55LxZJLA2fTHT0y+xU7vtRrO1qZiYNoouvmg26kxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqgklAYTLDdDax04zsKsarclxYxXuQHYz0097fszBIxgIhAMG9zuPhgp4Ozx+ZeT1w3Lr6ammfaAxCiOzr48GcFEF1"}]}},"0.1.1":{"name":"auto-curry","version":"0.1.1","description":"Supercharge your functions by giving them the ability to auto-curry","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["curry","auto","functional","function","currying"],"author":{"name":"Mudit Ameta"},"license":"MIT","repository":{"type":"git","url":"https://github.com/zeusdeux/auto-curry"},"bugs":{"url":"https://github.com/zeusdeux/auto-curry/issues"},"homepage":"https://github.com/zeusdeux/auto-curry","gitHead":"085699074fff0de0305aef16c52edca8960a1f0e","_id":"auto-curry@0.1.1","_shasum":"70196e162ef8b7e52a2c57084e5f1cb8f3da91d1","_from":".","_npmVersion":"1.4.24","_npmUser":{"name":"zeusdeux","email":"zeusdeux@gmail.com"},"maintainers":[{"name":"zeusdeux","email":"zeusdeux@gmail.com"}],"dist":{"shasum":"70196e162ef8b7e52a2c57084e5f1cb8f3da91d1","tarball":"https://registry.npmjs.org/auto-curry/-/auto-curry-0.1.1.tgz","integrity":"sha512-qUuZFAQSuZzX6A6hVdxoZtY47yyoTjQkbIrrJKDTrxNIf5tEu5QMZShKZEYMPalmxJxDUFhynte456s1wEUVaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHpq7EvDp4z4jSDziJOBO+YEA0/WXE9Lh3Buer/+FsucAiAuuRaean7IoGtWeGnqvr4GggC47i0C4KUiXk8h/cd7Kg=="}]}},"0.2.0":{"name":"auto-curry","version":"0.2.0","description":"Supercharge your functions by giving them the ability to auto-curry","main":"index.js","keywords":["curry","auto","functional","function","currying"],"author":{"name":"Mudit Ameta"},"license":"MIT","repository":{"type":"git","url":"https://github.com/zeusdeux/auto-curry"},"bugs":{"url":"https://github.com/zeusdeux/auto-curry/issues"},"homepage":"https://github.com/zeusdeux/auto-curry","devDependencies":{"browserify":"^6.0.2","jshint":"^2.5.6","mocha":"^1.21.4","uglify-js":"^2.4.15"},"gitHead":"d3240845d7d32e095292217eed00d92fd19dc989","_id":"auto-curry@0.2.0","scripts":{},"_shasum":"e027da967793088103da18a1bb9d1481c721a9db","_from":".","_npmVersion":"1.4.24","_npmUser":{"name":"zeusdeux","email":"zeusdeux@gmail.com"},"maintainers":[{"name":"zeusdeux","email":"zeusdeux@gmail.com"}],"dist":{"shasum":"e027da967793088103da18a1bb9d1481c721a9db","tarball":"https://registry.npmjs.org/auto-curry/-/auto-curry-0.2.0.tgz","integrity":"sha512-7PLHPaoCLEyaS4WLZhEiBOi7feuGWzvuKfv+RAmPiVXYmCKN/9xT5VE5YNnLKXYfTXXecSARWviLsxo2m1OIDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCE0sUQLEExhQn8Jicw8Kx1uU66A7Cw1+99EUxgRtvWKAIhAPATPPfO3xf2CLg00ML++dkalS7zCwpUNC/7tk4n75BW"}]}},"0.2.1":{"name":"auto-curry","version":"0.2.1","description":"Supercharge your functions by giving them the ability to auto-curry","main":"index.js","keywords":["curry","auto","functional","function","currying"],"author":{"name":"Mudit Ameta"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/zeusdeux/auto-curry.git"},"bugs":{"url":"https://github.com/zeusdeux/auto-curry/issues"},"homepage":"https://github.com/zeusdeux/auto-curry","devDependencies":{"browserify":"^6.0.2","jshint":"^2.5.6","mocha":"^1.21.4","uglify-js":"^2.4.15"},"gitHead":"f71485133930da61525f509243010b3159c1a6f0","_id":"auto-curry@0.2.1","scripts":{},"_shasum":"d50a2c4273b465e5a2d311bbe946355a68be6e53","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.3.0","_npmUser":{"name":"zeusdeux","email":"zeusdeux@gmail.com"},"dist":{"shasum":"d50a2c4273b465e5a2d311bbe946355a68be6e53","tarball":"https://registry.npmjs.org/auto-curry/-/auto-curry-0.2.1.tgz","integrity":"sha512-X5gVYDAabiylRdDoIX95tTLpCqOkz8Pr+3TLu3XpT8UASHR++woRIYACQG3By4LCXmva67tO3oszA+YNz/M6UA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPntL6X4YHhD/tImOZF2XTu7TBW5SuaB6euPUZd9y2AAIgG6JLGS86LerL2PIiOt6HHGwJxvWlRCfcjBNb3GDJ6Dg="}]},"maintainers":[{"name":"zeusdeux","email":"zeusdeux@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/auto-curry-0.2.1.tgz_1476745710475_0.40052373986691236"}}},"readme":"auto-curry\n==========\n\nSupercharge your functions by giving them the ability to auto-curry.\n\n> Note:\n> This library actually uses partial application internally and not currying. So, yes, the name is a misnomer.\n> It is the result of my incorrect understanding of the concepts when I wrote the library.\n> It is still perfectly usable and is used in production.\n\n# Installation\n\n```javascript\nnpm install auto-curry --save\n```\n\n# Usage\n\nIn `node`, you can just `require('auto-curry')`.\n\nIn the browser, you can use `build/auto-curry.min.js`\n\n- with `require.js`, `browserify` etc\n- directly by using `window.autoCurry`\n\n## Node\n\n```javascript\nvar cu = require('auto-curry');\nvar add = cu(function (a, b) {\n    return a + b;\n});\nvar messWithThis = cu(function(v){\n  this.a.push(v);\n  return ++v;\n});\nvar map = cu(function map(fn, list) {\n  var self = arguments[2] ? arguments[2] : this;\n  try {\n    return list.map(fn, self);\n  }\n  catch (e) {\n    return [].map.call(list, fn, self);\n  }\n});\nvar x = {a: []};\n\nconsole.log(map(add(1), [1, 2, 3])); //[2, 3, 4]\nconsole.log(map(messWithThis, [1,2,3], x)); //[2, 3, 4]\nconsole.log(x.a); //[1, 2, 3]\n```\n\n## Browser\n\n```javascript\nvar cu = window.autoCurry; //using it off the global\nvar add = cu(function (a, b) {\n    return a + b;\n});\nvar messWithThis = cu(function(v){\n  this.a.push(v);\n  return ++v;\n});\nvar map = cu(function map(fn, list) {\n  console.log(arguments[2]);\n  var self = arguments[2] ? arguments[2] : this;\n  try {\n    return list.map(fn, self);\n  }\n  catch (e) {\n    return [].map.call(list, fn, self);\n  }\n});\nvar x = {a: []};\n\nconsole.log(map(add(1), [1, 2, 3])); //[2, 3, 4]\nconsole.log(map(messWithThis, [1,2,3], x)); //[2, 3, 4]\nconsole.log(x.a); //[1, 2, 3]\n```\n\n# License\n\n[MIT](https://github.com/zeusdeux/auto-curry/blob/master/LICENSE)\n\n# Changelog\n\n#### `0.2.1`\n- Now, if the function passed to `auto-curry` has an arity of one, the function itself is returned. Earlier this was only for zero arity functions.\n","maintainers":[{"name":"zeusdeux","email":"zeusdeux@gmail.com"}],"time":{"modified":"2022-06-13T03:48:42.937Z","created":"2014-09-02T06:36:52.797Z","0.1.0":"2014-09-02T06:36:52.797Z","0.1.1":"2014-09-08T07:43:24.009Z","0.2.0":"2014-10-04T10:06:16.762Z","0.2.1":"2016-10-17T23:08:32.216Z"},"homepage":"https://github.com/zeusdeux/auto-curry","keywords":["curry","auto","functional","function","currying"],"repository":{"type":"git","url":"git+https://github.com/zeusdeux/auto-curry.git"},"author":{"name":"Mudit Ameta"},"bugs":{"url":"https://github.com/zeusdeux/auto-curry/issues"},"license":"MIT","readmeFilename":"README.md","users":{"fgribreau":true}}