{"name":"zames","version":"2.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"converts callback-based functions to Promises and apply currying to arguments","homepage":"http://github.com/coderaiser/zames","main":"lib/zames.js","repository":{"type":"git","url":"git://github.com/coderaiser/zames.git"},"keywords":["curry","promise","currify","promisify","function","arguments","callback"],"scripts":{"test":"tape test/*.js","coverage":"nyc npm test","lint":"eslint lib test","report":"nyc report --reporter=text-lcov | coveralls","build":"redrun clean 6to5 legacy:*","6to5":"babel -d legacy/lib lib","wisdom":"npm run build","clean":"rimraf legacy/*","watcher":"nodemon -w test -w lib --exec","watch:test":"npm run watcher -- npm test","watch:lint":"npm run watcher -- 'npm run lint'","watch:tape":"nodemon -w test -w lib --exec tape","watch:coverage:base":"npm run watcher -- nyc npm test","watch:coverage:tape":"npm run watcher -- nyc tape","watch:coverage":"bin/redrun.js watch:coverage:base","legacy:index":"echo \"module.exports = require('./lib/zames');\" > legacy/index.js"},"dependencies":{"currify":"^2.0.0","es6-promisify":"^6.0.0"},"license":"MIT","devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","eslint":"^4.0.0","nodemon":"^1.11.0","nyc":"^11.0.2","redrun":"^6.0.0","tape":"^4.5.1"},"gitHead":"2734af516af8030cb6052e42f4a48dcbf6dc7da3","bugs":{"url":"https://github.com/coderaiser/zames/issues"},"_id":"zames@2.0.0","_npmVersion":"6.0.0","_nodeVersion":"8.11.1","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"integrity":"sha512-o9xURXaNLqnkZwk9f9uxraL/k1vXdcYDtJtmesJi0lcpyzkJKhBVyg3ohLfdXEDeHWj/7DfZ6/axINQyaKZGOQ==","shasum":"2d274df02a78cd9cc6f164b0eb5e54700dc83336","tarball":"http://registry-npm.ywwl.com/zames/download/zames-2.0.0.tgz","fileCount":7,"unpackedSize":8442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa6zlUCRA9TVsSAnZWagAAN24P/RN6TBVnAAN5VPRNT9hU\n8T7gl/2VgpFO+dNW7rGQO8lmsJ+bIZatP/nO2sQ4TQ/WmifB8wh8+N4c2jdy\nD+mEUYMZxdunWCjB4SyaG1Dbd8NXJKwpmOThk0n31WCtpyF2Da7s9ImS3JL7\n9zJuSG9Z91vMCvB6vRMINPHITxkm3GfoMIVoDgaLrP5gKRbNwOIgE3w4L+yW\nlWCdt5G4H85n2RHKQxdtw/X3wZj/gvWl92NlOSOTpvw9JXbe2H1HDxPevm4u\nRLupiUbtG2T+Lkb1rGWidx13IU23ppVeruhUEZ/jOVUypvefQI3J/O2zllJv\n2VqeXHSK1C1YiccdNoGukSGxZnMYdqFDP2LpvoN0yWRtlMdljNn+xgDn298+\nzcYLUSMeC4PSG4w9V4lb8LdF6T4MDlykPZD4SArOL4smxpeH+6tFj22vr/JQ\nIItZLp2wKIv18wmG9V8xhmLi4FiTYPVBCxKe8nrR8N1bUL+VehdAxkTqP2r1\nNol9MRAwLO7BoT5QSrya1aYV89Q6PSjXoTlnhgg1IXNb3ujd5FDq0wY6/Sv3\nbJojjqepVNcV79P8+sTkSoC/GNexQie5pMLYyVCt4bw1TDb98q4iEvvV0qe9\n3dWJJ6dNWS6OH96E2edLuITMxz45/Ffzdy6LEaH/3CQdf6UxzBb/qlaJKh6A\nYXt5\r\n=NPX0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiBCf9TFh0tKJ9rJ3f6GaFm5JKDeEJY2EJmpwAhWecKAIhAL8GyXxXhDuZs8cA1zEFRV2VDv2XiixKH+IYv6Gd6lVj"}],"size":3219,"noattachment":false,"key":"/zames/-/zames-2.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zames_2.0.0_1525365076015_0.9386640175572807"},"_hasShrinkwrap":false,"readme":"# Zames [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]\n\n`zames` converts callback-based functions to Promises and apply currying to arguments.\n\n`zames` = [currify][currify] + [promisify][promisify].\n\n## Install\n\n`npm i zames --save`\n\n## API\n\n### zames(fn [,ctx])\n\n- `fn` - function\n- `ctx` - context\n\n`zames` can take just a `function`:\n\n```js\nconst zames = require('zames');\n\nconst promise = zames((a, b, fn) => {\n    fn(null, a + b);\n});\n\nconst add = promise('hello ');\n\nadd('world').then((a) => {\n    console.log(a);\n    // output\n    'hello world';\n});\n\n```\n\nOr can be used with `ctx` as well:\n\n```js\nconst ctx = {\n    error: 'hello',\n    log: function(a, b, fn) {\n        fn(this.error);\n    }\n}\n\nconst withContext = zames(ctx.log, ctx);\n\nwithContext(1, 2)\n    .catch((e) => {\n        console.error(e.message);\n        // output\n        'hello';\n    });\n\n```\n\n## Related\n\n- [currify](https://github.com/coderaiser/currify \"currify\") - translate the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single or more arguments.\n\n- [fullstore](https://github.com/coderaiser/fullstore \"fullstore\") - functional variables.\n\n- [wraptile](https://github.com/coderaiser/wraptile \"wraptile\") - translate the evaluation of a function that takes multiple arguments into evaluating a sequence of 2 functions, each with a any count of arguments.\n\n## License\n\nMIT\n\n[NPMIMGURL]:                https://img.shields.io/npm/v/zames.svg?style=flat\n[BuildStatusIMGURL]:        https://img.shields.io/travis/coderaiser/zames/master.svg?style=flat\n[DependencyStatusIMGURL]:   https://img.shields.io/david/coderaiser/zames.svg?style=flat\n[LicenseIMGURL]:            https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat\n[NPMURL]:                   https://npmjs.org/package/zames \"npm\"\n[BuildStatusURL]:           https://travis-ci.org/coderaiser/zames  \"Build Status\"\n[DependencyStatusURL]:      https://david-dm.org/coderaiser/zames \"Dependency Status\"\n[LicenseURL]:               https://tldrlegal.com/license/mit-license \"MIT License\"\n\n[CoverageURL]:              https://coveralls.io/github/coderaiser/zames?branch=master\n[CoverageIMGURL]:           https://coveralls.io/repos/coderaiser/zames/badge.svg?branch=master&service=github\n\n[currify]:                 https://en.wikipedia.org/wiki/Currying \"Currying\"\n[promisify]:                https://github.com/digitaldesignlabs/es6-promisify \"Promisify\"\n\n","publish_time":1525365076081,"_cnpm_publish_time":1525365076081,"dist-tags":{"latest":"3.0.0"}}