{"name":"compose-function","version":"1.4.1","description":"Compose new functions f(g(x))","main":"index.js","scripts":{"test":"sjs -m ./macro test.sjs -o test.js; _mocha --reporter nyan; rm test.js"},"repository":{"type":"git","url":"http://github.com/stoeffel/compose-function"},"keywords":["function","compose","functional"],"author":{"name":"stoeffel"},"license":"MIT","bugs":{"url":"http://github.com/stoeffel/compose-function/issues"},"homepage":"http://github.com/stoeffel/compose-function","devDependencies":{"chickencurry":"^1.0.2","expect.js":"^0.3.1","mocha":"^2.1.0","sweet.js":"^0.7.3"},"dependencies":{"arity-n":"^1.0.3"},"gitHead":"7d25d997e3d2cc90d5bb4d734623cfe99d059866","_id":"compose-function@1.4.1","_shasum":"3710fbf20ee3e1ea7e45f9d1cd7e48e7b4d0d5cb","_from":".","_npmVersion":"2.1.10","_nodeVersion":"0.10.25","_npmUser":{"name":"schtoeffel","email":"schtoeffel@gmail.com"},"maintainers":[{"name":"schtoeffel","email":"schtoeffel@gmail.com"}],"dist":{"shasum":"3710fbf20ee3e1ea7e45f9d1cd7e48e7b4d0d5cb","tarball":"http://registry-npm.ywwl.com/compose-function/download/compose-function-1.4.1.tgz","integrity":"sha512-7WRVPxS3NEdr++XdA6Rht2rV06s0P/dcRhfHqvhzSSKoJ6I/OnAkBJfnM9BLp9hGOwYth9AtJdh6qkhJao9QTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAHqCHQ0CoRm/rFCUZaFtOuSZL/cgUqP8YUxdjYda/k5AiANyBZY0K2pNA01ylHJvaXm+QptIDNkaylc6RBsxsRw4g=="}],"size":3202,"noattachment":false,"key":"/compose-function/-/compose-function-1.4.1.tgz"},"directories":{},"readme":"[![Travis](https://img.shields.io/travis/stoeffel/compose-function.svg?style=flat-square)](https://travis-ci.org/stoeffel/compose-function)\n[![npm](https://img.shields.io/npm/v/compose-function.svg?style=flat-square)](https://www.npmjs.com/package/compose-function)\n[![Dependency Status](https://david-dm.org/stoeffel/compose-function.svg?style=flat-square)](https://david-dm.org/stoeffel/compose-function)\n[![Coveralls](https://img.shields.io/coveralls/stoeffel/compose-function.svg?style=flat-square)](https://coveralls.io/github/stoeffel/compose-function)\n\n\n<h1 align=\"center\">Compose-Function</h1>\n\n<p align=\"center\">\n  <a href=\"#installation\">Installation</a> |\n  <a href=\"#usage\">Usage</a> |\n  <a href=\"#related\">Related</a> |\n  <a href=\"#license\">License</a>\n  <br><br>\n  <img align=\"center\" height=\"300\" src=\"http://33.media.tumblr.com/006dfad04f93ec5b3680ec7cdae3fafa/tumblr_n8kgl18uU41qcung4o1_1280.gif\">\n  <br>\n  <sub>logo by <a href=\"http://justinmezzell.tumblr.com/\">Justin Mezzell</a></sub>\n  <blockquote align=\"center\">Compose a new function from smaller functions `f(g(x))`</blockquote>\n</p>\n\nInstallation\n------------\n\n`npm install compose-function`\n\nUsage\n-----\n\n## Basic usage\n\n```js\nimport compose from 'compose-function';\n\nconst composition = compose(sqr, add2); // sqr(add2(x))\n\ncomposition(2) // => 16\n\ncompose(sqr, inc)(2); // => 9\ncompose(inc, sqr)(2); // => 5\n```\n\n\n## with curry\n\n```js\nimport compose from 'compose-function';\nimport { curry, _ } from 'curry-this';\n\n\nconst add = (x, y) => x + y;\n\n// add(6, sqr(add(2, x)))\ncompose(\n  add::curry(6),\n  sqr,\n  add::curry(2),\n);\n\n// map(filter(list, even), sqr)\ncompose(\n  map::curry(_, sqr),\n  filter::curry(_, even),\n)([1,2,3,4,5,6,7,8]) // => [4, 16, 36, 64]\n```\n\n### `::` huh?\n\nIf you’re wondering what the `::` thing means, you’d better read this excellent [overview](https://github.com/jussi-kalliokoski/trine/blob/5b735cbfb6b28ae94bac0446d9ecd5ce51fb149b/README.md#why) by [@jussi-kalliokoski](https://github.com/jussi-kalliokoski) or have a look at the [function bind syntax proposal](https://github.com/zenparsing/es-function-bind).\nOr checkout the [curry-this docs][ct].\n\n\nRelated\n----\n\n* [curry-this][ct]\n\nLicense\n----\n\nMIT © [Christoph Hermann](http://stoeffel.github.io)\n\n[r]: http://ramdajs.com\n[ct]: https://github.com/stoeffel/curry-this\n","publish_time":1421765863817,"_cnpm_publish_time":1421765863817,"dist-tags":{"latest":"3.0.3"}}