{"_id":"par","_rev":"30-82b5847fa1479872c998830888955086","name":"par","description":"Simple partial function application.","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"par","version":"0.1.0","author":{"name":"Alan Plum","email":"me@pluma.io"},"description":"Simple partial function application.","repository":{"type":"git","url":"https://github.com/pluma/par.git"},"keywords":["partial","partial function application","curry"],"dependencies":{},"devDependencies":{"mocha":"1.7.x","expect.js":"0.2.x","uglify-js":"1.3.x","jshint":"0.9.x"},"license":"MIT","main":"./dist/par.js","scripts":{"test":"make test"},"engines":{"node":">=0.6"},"_id":"par@0.1.0","dist":{"shasum":"b5be1c094984187fa3bf0bbeeeb5c86abc126124","tarball":"https://registry.npmjs.org/par/-/par-0.1.0.tgz","integrity":"sha512-oSXSrAZllWsHMOGGs9LVNqYtXrydKJ+M18312POCYKJ/LpKRScZuLyb0mQvEmroycBR8h1YVuiqjzVmq9frTwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAPn0YWLhDk50OBr0+qv089RugK9mPDSUG0k0V2tPrcoAiEAk3n35cxzNQo+rLFHvtESiBjZPPMJySyYVp1DnEszy+8="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"pluma","email":"me@alanplum.com"},"maintainers":[{"name":"pluma","email":"me@alanplum.com"}],"directories":{}},"0.1.1":{"name":"par","version":"0.1.1","author":{"name":"Alan Plum","email":"me@pluma.io"},"description":"Simple partial function application.","repository":{"type":"git","url":"https://github.com/pluma/par.git"},"keywords":["partial","partial function application","curry"],"dependencies":{},"devDependencies":{"mocha":"1.7.x","expect.js":"0.2.x","uglify-js":"1.3.x","jshint":"0.9.x"},"license":"MIT","main":"./dist/par.js","scripts":{"test":"make test"},"engines":{"node":">=0.6"},"testling":{"files":"spec/*.js","harness":"mocha","browsers":["chrome/latest","chrome/canary","firefox/latest","firefox/nightly","opera/latest","opera/next","safari/4..latest","ie/6..latest"]},"_id":"par@0.1.1","dist":{"shasum":"7c13af969e0d210fd94af84c6a695ae72bea6bdb","tarball":"https://registry.npmjs.org/par/-/par-0.1.1.tgz","integrity":"sha512-ruI4T/eP6hK6kKbj8O4hCsCsQJFdJOlEbfOrNvJMtn9w88viU46nxl5djGZed9ON2U/JOb4JWtGiZZArkO0ffQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfNpnmJyewGkwEeZHrTFiAEx2JQcSHCi9lQUCw4Q2LlAiBXGQH5p+26k9rG5mEVUypR1egH7xu9AZmrVc98Zl4f8A=="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"pluma","email":"me@alanplum.com"},"maintainers":[{"name":"pluma","email":"me@alanplum.com"}],"directories":{}},"0.1.2":{"name":"par","version":"0.1.2","author":{"name":"Alan Plum","email":"me@pluma.io"},"description":"Simple partial function application.","repository":{"type":"git","url":"https://github.com/pluma/par.git"},"keywords":["partial","partial function application","curry"],"dependencies":{},"devDependencies":{"mocha":"1.9.x","expect.js":"0.2.x","uglify-js":"2.3.x","jshint":"2.0.x"},"license":"MIT","main":"./dist/par.js","scripts":{"test":"make test"},"engines":{"node":">=0.6"},"testling":{"files":"spec/*.js","harness":"mocha","browsers":["chrome/latest","chrome/canary","firefox/3.6..4","firefox/latest","firefox/nightly","opera/10","opera/latest","opera/next","safari/4..latest","ie/6..latest"]},"_id":"par@0.1.2","dist":{"shasum":"bb3833258d46f73d32926aae039435b6e9a49cc9","tarball":"https://registry.npmjs.org/par/-/par-0.1.2.tgz","integrity":"sha512-qoI/PAWETWYemhJ+RRVvuAm/yYZfHOX4EDVlIIDKSWig7ybnUGMH889X6Ug/sh7RdV4Joga+K2Oq/0GLk20gFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoi6mWcXgcM04aYdqtjjmkY5G9fB1OMJXGCcqC2tJG3wIgY8zwZfSqXnnzWFEQoQdEeiQVJvuWcIFCc/uS13gBOw0="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"pluma","email":"me@pluma.io"},"maintainers":[{"name":"pluma","email":"me@alanplum.com"}],"directories":{}},"0.1.3":{"name":"par","version":"0.1.3","author":{"name":"Alan Plum","email":"me@pluma.io"},"description":"Simple partial function application.","repository":{"type":"git","url":"https://github.com/pluma/par.git"},"keywords":["partial","partial function application","curry"],"dependencies":{},"devDependencies":{"mocha":"1.9.x","expect.js":"0.2.x","uglify-js":"2.3.x","jshint":"2.0.x"},"license":"MIT","main":"./dist/par.js","scripts":{"test":"make test"},"engines":{"node":">=0.6"},"testling":{"files":"spec/*.js","harness":"mocha","browsers":["chrome/latest","chrome/canary","firefox/3.6..4","firefox/latest","firefox/nightly","opera/10..latest","opera/next","safari/4..latest","ie/6..latest"]},"_id":"par@0.1.3","dist":{"shasum":"38ab57a3f01cb9b287e428e4c52aef36eb5cd267","tarball":"https://registry.npmjs.org/par/-/par-0.1.3.tgz","integrity":"sha512-GPNJ8a8MDgFAxd3ChC2jf66awEQYKAketGuoKwj2Lt/AztSaeposR4nJ7z7+m+wKWLrndkDsFwsqMAqQKxkkww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDUPV5eSG7qwwZkAf5P7/+aXN0lPAaTKBZ5Haj65YGs9AiBcn91MA+2HnhS7LvmdxhzVzWIoY/cAUZsJzQD04CPfZA=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"pluma","email":"me@pluma.io"},"maintainers":[{"name":"pluma","email":"me@alanplum.com"}]},"0.2.0":{"name":"par","version":"0.2.0","author":{"name":"Alan Plum","email":"me@pluma.io"},"description":"Simple partial function application.","repository":{"type":"git","url":"https://github.com/pluma/par.git"},"keywords":["partial","partial function application","curry"],"dependencies":{},"devDependencies":{"mocha":"1.10.x","expect.js":"0.2.x","uglify-js":"2.3.x","jshint":"2.1.x"},"license":"MIT","main":"./dist/par.js","scripts":{"test":"make test"},"engines":{"node":">=0.6"},"testling":{"files":"spec/*.js","harness":"mocha","browsers":["chrome/latest","chrome/canary","firefox/3.6..4","firefox/latest","firefox/nightly","opera/10..latest","opera/next","safari/4..latest","ie/6..latest"]},"_id":"par@0.2.0","dist":{"shasum":"70d7216a87c29737d372e83d3dc0c1924c656ac6","tarball":"https://registry.npmjs.org/par/-/par-0.2.0.tgz","integrity":"sha512-zQ5YQgbH+8Qm6I8dfgTVEV7yUuUEyAy4KRk2XjOHP/F/6dPgoPnRO/AfEghHgttWtdojCFINsh+0aubvoSgh6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWzdbyK1dxoDxtGg1hmYwR1G/mKwlrw/6EXYfi97bbJwIgUmMWYSO5lXYT6vceQ1smtbYLdtK7+37x1O3Ijz5rCqA="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"pluma","email":"me@pluma.io"},"maintainers":[{"name":"pluma","email":"me@alanplum.com"}]},"0.2.1":{"name":"par","version":"0.2.1","author":{"name":"Alan Plum","email":"me@pluma.io"},"description":"Simple partial function application.","licenses":{"type":"UNLICENSE","url":"https://github.com/pluma/par/blob/master/UNLICENSE"},"repository":{"type":"git","url":"https://github.com/pluma/par.git"},"keywords":["partial","partial function application","curry"],"dependencies":{},"devDependencies":{"mocha":"1.10.x","expect.js":"0.2.x","uglify-js":"2.3.x","jshint":"2.1.x"},"main":"./dist/par.js","scripts":{"test":"make test"},"engines":{"node":">=0.6"},"testling":{"files":"spec/*.js","harness":"mocha","browsers":["chrome/latest","chrome/canary","firefox/3.6..4","firefox/latest","firefox/nightly","opera/10..latest","opera/next","safari/4..latest","ie/6..latest"]},"_id":"par@0.2.1","dist":{"shasum":"ba7430f6a6bb209c6edba3aa2ea3bd03a76fcd01","tarball":"https://registry.npmjs.org/par/-/par-0.2.1.tgz","integrity":"sha512-ZwDoGbvopUb8rfv45rbDwwP2ZRqzAcjvnqhuRWSfIYwogpR8mqu5j58WqmcgPCKZRXMEwoypFovG+ty3g13nOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBbaYSgyKY9aHx/emUz3VT55WE17cI00gcawkDBS894BAiBgz3MUY3A0J2tRBa9C6Ypz/sDNj8Sgc1fyjepxHOY1/w=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"pluma","email":"me@pluma.io"},"maintainers":[{"name":"pluma","email":"me@alanplum.com"}]},"0.3.0":{"name":"par","version":"0.3.0","author":{"name":"Alan Plum","email":"me@pluma.io"},"description":"Simple partial function application.","licenses":{"type":"UNLICENSE","url":"https://github.com/pluma/par/blob/master/UNLICENSE"},"repository":{"type":"git","url":"https://github.com/pluma/par.git"},"keywords":["partial","partial function application","curry"],"dependencies":{},"devDependencies":{"mocha":"~1.17","expect.js":"~0.2","uglify-js":"~2.4","jshint":"~2.4","istanbul":"~0.2","coveralls":"~2.6"},"main":"./dist/par.js","scripts":{"test":"make test","coveralls":"make coveralls"},"engines":{"node":">=0.6"},"testling":{"files":"spec/*.js","harness":"mocha","browsers":["chrome/latest","chrome/canary","firefox/3.6..4","firefox/latest","firefox/nightly","opera/10..latest","opera/next","safari/4..latest","ie/6..latest"]},"_id":"par@0.3.0","dist":{"shasum":"2ea35379b3107dc101db1561f01fee196adc29a3","tarball":"https://registry.npmjs.org/par/-/par-0.3.0.tgz","integrity":"sha512-6V910zFAoHnxjX6ILkwbQcpIkD3KI2gBAPfCtZQNaJTvTxgIoKXSwDQIE3ty0zbOGdBXHRnl6rd66a5jj12pfw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHfTIRkxhQFam4KxunMllyXDnPOPesk3RE+N07w9SHx2AiBhD7N/JQPlrTOuuS6Lbg64lIdF63FUZyzLe05iKOhAlA=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"pluma","email":"me@pluma.io"},"maintainers":[{"name":"pluma","email":"me@alanplum.com"}]}},"readme":"# Synopsis\n\n**par** is a JavaScript implementation of partial function application (sometimes incorrectly called \"currying\").\n\n[![stability 3 - stable](http://b.repl.ca/v1/stability-3_--_stable-yellowgreen.png)\n](http://nodejs.org/api/documentation.html#documentation_stability_index) [![license - Unlicense](http://b.repl.ca/v1/license-Unlicense-lightgrey.png)](http://unlicense.org/)\n\n[![browser support](https://ci.testling.com/pluma/par.png)](https://ci.testling.com/pluma/par)\n\n[![Build Status](https://travis-ci.org/pluma/par.png?branch=master)](https://travis-ci.org/pluma/par) [![Coverage Status](https://coveralls.io/repos/pluma/par/badge.png?branch=master)](https://coveralls.io/r/pluma/par?branch=master) [![Dependencies](https://david-dm.org/pluma/par.png?theme=shields.io)](https://david-dm.org/pluma/par)\n\n[![NPM status](https://nodei.co/npm/par.png?compact=true)](https://npmjs.org/package/par)\n\n# How is this different from [`Function#bind`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/bind)?\n\nThe primary purpose of `Function#bind` is to create a closure to preserve a function's context (the `this` variable). Most implementations, including the one in ES 5, also allow partial function application.\n\nThe functions provided by `par` also create closures, but they pass their own context along. This means `Function#apply`, `Function#call` and method invocation syntax still behave as expected (with the context being set accordingly).\n\nIf you don't care about contexts (e.g. the function you want to wrap doesn't use `this`), `lpartial` and `Function#bind` can be used interchangeably.\n\nThere is no native equivalent of `rpartial`.\n\nAnother important distinction is that unlike `Function#bind`, `par` works in environments that don't support ECMAScript 5, such as legacy versions of Internet Explorer (versions 8 and lower) or Rhino (e.g. the version bundled with Sun JDK 1.6).\n\n# Install\n\n## Node.js\n\n### With NPM\n\n```sh\nnpm install par\n```\n\n### From source\n\n```sh\ngit clone https://github.com/pluma/par.git\ncd par\nnpm install\nmake && make dist\n```\n\n## Browser\n\n### With component\n\n```sh\ncomponent install pluma/par\n```\n\n[Learn more about component](https://github.com/component/component).\n\n### With bower\n\n```sh\nbower install par\n```\n\n[Learn more about bower](https://github.com/twitter/bower).\n\n### With a CommonJS module loader\n\nDownload the [latest minified CommonJS release](https://raw.github.com/pluma/par/master/dist/par.min.js) and add it to your project.\n\n[Learn more about CommonJS modules](http://wiki.commonjs.org/wiki/Modules/1.1).\n\n### With an AMD module loader\n\nDownload the [latest minified AMD release](https://raw.github.com/pluma/par/master/dist/par.amd.min.js) and add it to your project.\n\n[Learn more about AMD modules](http://requirejs.org/docs/whyamd.html).\n\n### As a standalone library\n\nDownload the [latest minified standalone release](https://raw.github.com/pluma/par/master/dist/par.globals.min.js) and add it to your project.\n\n```html\n<script src=\"/your/js/path/par.globals.min.js\"></script>\n```\n\nThis makes the `par` module available in the global namespace.\n\n# Basic usage example\n\n```javascript\nvar par = require('par');\n\nfunction divideBy(x, y) {\n    return x / y;\n}\n\nvar divide4By = par(divideBy, 4);\nconsole.log(divide4By(10)); // 0.4\n\nvar divideBy4 = par.rpartial(divideBy, 4);\nconsole.log(divideBy4(10)); // 2.5\n```\n\n# Wrap-around example\n\n```javascript\nvar par = require('par');\n\nfunction say() {\n    // This assumes a modern browser or recent version of IE\n    console.log.apply(console, arguments);\n}\n\nsay('I love Internet Explorer!'); // \"I love Internet Explorer!\"\n\nvar sarcastic = par.rpartial(par(say, '[sarcasm]'), '[/sarcasm]');\n\nsarcastic('I love Internet Explorer!'); // \"[sarcasm] I love Internet Explorer! [/sarcasm]\"\n```\n\n# API\n\n## par(fn, args…):Function\n\nCreates a partially applied function that will append the initial arguments to the left-hand side of the argument list.\n\n## par.rpartial(fn, args…):Function\n\nCreates a partially applied function that will append the initial arguments to the right-hand side of the argument list.\n\n## par.lpartial(fn, args…):Function\n\nAlias for `par`.\n\n# Unlicense\n\nThis is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying [UNLICENSE](https://github.com/pluma/par/blob/master/UNLICENSE) file.\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/pluma/par/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","maintainers":[{"name":"pluma","email":"me@alanplum.com"}],"time":{"modified":"2022-06-23T09:30:48.706Z","created":"2013-04-14T17:47:26.598Z","0.1.0":"2013-04-14T17:47:31.710Z","0.1.1":"2013-04-15T22:20:00.174Z","0.1.2":"2013-05-14T14:31:06.894Z","0.1.3":"2013-05-24T10:03:39.365Z","0.2.0":"2013-05-30T22:30:45.375Z","0.2.1":"2014-01-04T00:46:42.670Z","0.3.0":"2014-01-22T23:56:33.039Z"},"author":{"name":"Alan Plum","email":"me@pluma.io"},"repository":{"type":"git","url":"https://github.com/pluma/par.git"},"readmeFilename":"README.md"}