{"name":"zames","version":"2.0.1","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":"^3.0.0","es6-promisify":"^6.0.0"},"license":"MIT","devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","coveralls":"^3.0.0","eslint":"^5.6.0","nodemon":"^1.11.0","nyc":"^13.0.1","redrun":"^7.0.0","tape":"^4.5.1"},"gitHead":"e37a28fc764b2d794e3c1988a3ff0496654fb33f","bugs":{"url":"https://github.com/coderaiser/zames/issues"},"_id":"zames@2.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"integrity":"sha512-gJJxR12zrhOBl96d/9PorsFAEU+xUOtxOwO2lUofj8a40ahx+nxjQftzD35/GdxLzlJ5vTWh4oG81TpmKh/+hw==","shasum":"f52633e193699b707672e32aeb6d51a09b6c8b36","tarball":"http://registry-npm.ywwl.com/zames/download/zames-2.0.1.tgz","fileCount":7,"unpackedSize":8590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvcEdCRA9TVsSAnZWagAAEtEP/Rb6XqCHqyeuaaDIbDFX\nDBsyzz4Z8P3mNIdn6ZBGgDZiwK2XeIHvUiQ9c6UjenXZDMswtpMv+Q0QMxWD\nnvHaNNpvhaHTkJ1hc8WdG5D8yD0AXgtkiL/CZ3SM5xu+8YBAd5tNhmyosAof\nXD9EwBI2sPo5QjCvBBjPi8wY9azh2tqkZgSrARqwSOtM8cx/Fh98ajbOP3Go\nPHm/UtCU1TKWdHiIXauLz0LtFJhaMnlC276xqu1lPs281nVL1jBoPQTUbI8z\nIjL/PdOZGhv8PkHqLbSQkYpBc0St/2fms6QQ+M/v8pdPUCW5As+VXwvtC3ll\nw5LLM5IsFVvUN0uV8gFnmjEyiuulyAtIYpQfNILsn2e1z7cyc5G0bvAMCaSR\nHOTbya3craifthW3cz9KL5jYB1d4BYYFjB4sjE6TZoMpiZIzGNp5OAkxyMBV\nNWHi9YBKzYy7uPmR37ewJx3LKBvKeL7XmSi32ZRna1G2Zbd2T5uqUNTuoxaU\ntdj1eJ/L2PfIxtGaT0EjpYbZ2KOWGK9YLXSH3oLySMIivL9i2jjXJFp106YK\ng6Y/wNh7c3Dxz3jbrTHAnmtMBR/BQTo0QkUTv4kc45F1jlh84mDphWKLjYel\n1TO9W+DLoC2t5W7fnlSMc66Q2hQn9OVaGknQdE+4Zhd2SLovyOuxF6DVGIhX\nJ8NJ\r\n=F/ko\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8v58k3uD+id1TFfbs0KoKNyoN2dSWzAxbFJTI/OYp2gIgHIfkNJl4KRPn6RIg2XN130A+J6ZJUZtHTePDpog0kM0="}],"size":3251,"noattachment":false,"key":"/zames/-/zames-2.0.1.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zames_2.0.1_1539162396535_0.5465682093643949"},"_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":1539162397077,"_cnpm_publish_time":1539162397077,"dist-tags":{"latest":"3.0.0"}}