{"_id":"ap","_rev":"12-ca69002bee1b1fc0bdfefc369ec580b9","name":"ap","description":"Currying in javascript. Like .bind() without also setting `this`.","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"ap","version":"0.0.1","description":"Currying in javascript. Like .bind() without also setting `this`.","main":"./index.js","directories":{"example":"./examples"},"repository":{"type":"git","url":"git://github.com/substack/node-ap.git"},"keywords":["curry","apply","ap","bind","function","functional"],"devDependencies":{"expresso":">=0.6.0"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"scripts":{"test":"expresso"},"license":"MIT/X11","engine":{"node":">=0.4.0"},"_id":"ap@0.0.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.7","_nodeVersion":"v0.5.0-pre","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"c245b2a2b97457c05f56e4d3a91138c6fe68af82","tarball":"https://registry.npmjs.org/ap/-/ap-0.0.1.tgz","integrity":"sha512-49JJr0YmpWXIkLYplE9UTUf6GmZTnBW3puLHaHvV6WBINOENkpTyYPbSo4XA84wOXC225JEJMo39uQSpdWu5vA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDydRKp/QtIBJRs16k/TLIulT8BWbN2ZvjTKOf/lWBvPwIhAIhrcMRm1MEHlgorizRKhChaijUkfNCBgAafWymNZqix"}]}},"0.1.0":{"name":"ap","version":"0.1.0","description":"Currying in javascript. Like .bind() without also setting `this`.","main":"./index.js","directories":{"example":"./examples"},"repository":{"type":"git","url":"http://github.com/substack/node-ap.git"},"keywords":["curry","apply","ap","bind","function","functional"],"devDependencies":{"tap":"0.2.5"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"scripts":{"test":"tap ./test"},"license":"MIT/X11","engine":{"node":">=0.4.0"},"readme":"","_id":"ap@0.1.0","dist":{"shasum":"d8a3f26615379398a1b53ca6cc1a666a0fbfe150","tarball":"https://registry.npmjs.org/ap/-/ap-0.1.0.tgz","integrity":"sha512-iNF0PHuPu0RokHSicNS46wSj3bg3inzbDVaoFVZ+T0C+RvSu1bqg+OilF8Sr8S6j9mURv3Xx7BnT3bbF5fgytw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiTsEuAgo51Bv03R4IfkteCoZKyJJwvKqgWRLJAWGsIwIhAIA2AkG3QZ6sdxKsMWRwmGMseofwW58E7//7OL3mvz7R"}]},"maintainers":[{"name":"substack","email":"mail@substack.net"}]},"0.2.0":{"name":"ap","version":"0.2.0","description":"Currying in javascript. Like .bind() without also setting `this`.","main":"./index.js","directories":{"example":"./examples"},"repository":{"type":"git","url":"http://github.com/substack/node-ap.git"},"keywords":["curry","apply","ap","bind","function","functional"],"devDependencies":{"tap":"0.2.5"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"scripts":{"test":"tap ./test"},"license":"MIT/X11","engine":{"node":">=0.4.0"},"readme":"ap\n==\n\n`Function.prototype.bind` sets `this` which is super annoying if you just want\nto do currying over arguments while passing `this` through.\n\nInstead you can do:\n\n``` js\nvar ap = require('ap');\nvar z = ap([3], function (x, y) {\n    return this.z * (x * 2 + y);\n}).call({ z : 10 }, 4);\nconsole.log(z);\n```\n\n***\n\n```\n100\n```\n\nmethods\n=======\n\n``` js\nvar ap = require('ap')\n```\n\n## ap(args, fn)\n\nFill in the arguments `args` at the beginning of `fn`'s arguments list.\n\n## ap.pa(args, fn)\n\nFill in the arguments `args` at the end of `fn`'s arguments list.\n\n## ap.apa(left, right, fn)\n\nFill in `left` arguments starting from the beginning of `fn`'s argument list and\n`right` arguments starting from the end.\n\n## ap.partial(fn, args...)\n\nFill in `fn`'s arguments with `args...` from the beginning of `fn`'s arguments\nlist.\n\n## ap.partialRight(fn, args...)\n\nFill in `fn`'s arguments with `args...` starting from the end of `fn`'s\narguments list.\n\n## ap.curry(fn, args...)\n\nCurry `fn`, returning a new function with `args...` partially applied from the\nbeginning of `fn`'s arguments list.\n\n## ap.curryRight(fn, args...)\n\nCurry `fn` returning a new function with `args...` partially applied from the\nend of `fn`'s arguments list.\n","_id":"ap@0.2.0","dist":{"shasum":"ae0942600b29912f0d2b14ec60c45e8f330b6110","tarball":"https://registry.npmjs.org/ap/-/ap-0.2.0.tgz","integrity":"sha512-ImdvquIuBSVpWRWhB441UjvTcZqic1RL+lTQaUKGdGEp1aiTvt/phAvY8Vvs32qya5FJBI8U+tzNBYzFDQY/lQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/XSNj6bNDCg6F8tnBiiu9KWx68kD9iJJ5ajFT9fDOKgIhAMJXOGB/8JLSXDVSSGFq7MOtMvpWyMj+OmdFEjqHRAXk"}]},"_npmVersion":"1.1.59","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}]}},"maintainers":[{"email":"nopersonsmodules@gmail.com","name":"nopersonsmodules"}],"time":{"modified":"2022-11-11T06:32:58.971Z","created":"2011-02-25T03:32:08.710Z","0.0.1":"2011-02-25T03:32:09.086Z","0.1.0":"2012-06-25T06:12:44.343Z","0.2.0":"2012-11-26T03:22:01.537Z"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"repository":{"type":"git","url":"http://github.com/substack/node-ap.git"},"users":{"nwinant":true}}