{"name":"zames","version":"1.1.3","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","watcher":"nodemon -w test -w lib --exec","watch:test":"npm run watcher -- npm test","watch:coverage":"npm run watcher -- npm run coverage","lint":"eslint lib test","build":"redrun clean init 6to5 legacy:* bundle bundle:es6 minify","init":"mkdirp dist legacy","minify":"minify dist/zames.js > dist/zames.min.js","wisdom":"npm run build","clean":"rimraf legacy dist","bundle:base":"browserify -s zames --ng false","bundle":"npm run bundle:base -- -r ./legacy/lib/zames.js:zames ./legacy/lib/zames.js -o dist/zames.js","bundle:es6:base":"npm run bundle:base -- -r ./lib/zames.js:zames ./lib/zames.js","bundle:es6":"npm run bundle:es6:base -- -o dist/zames.es6.js","coverage":"nyc npm test","report":"nyc report --reporter=text-lcov | coveralls","6to5":"buble lib -o legacy/lib","legacy:index":"echo \"module.exports = require('./lib/zames');\" > legacy/index.js"},"dependencies":{"currify":"^2.0.0","es6-promisify":"^6.0.0"},"license":"MIT","devDependencies":{"browserify":"^15.2.0","buble":"^0.18.0","coveralls":"^3.0.0","eslint":"^4.0.0","minify":"^3.0.0","mkdirp":"^0.5.1","nodemon":"^1.11.0","nyc":"^11.0.2","redrun":"^5.0.1","tape":"^4.5.1"},"gitHead":"2f010c1d520051064e83256a4fbaafd9c67e882e","bugs":{"url":"https://github.com/coderaiser/zames/issues"},"_id":"zames@1.1.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"integrity":"sha512-mOwP52FPCaKOQYo5T3IwLzU4ZsQ9RTv4PuuA3rk8JwFobGsj+icapFejwYxsVdJmKx1uYbLphSA60u8vCaygQw==","shasum":"4411ae6598e34e8c69283ceaabcb3b83a662118a","tarball":"http://registry-npm.ywwl.com/zames/download/zames-1.1.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOuhJh2G5bIDhlC5NJz249HPshOfp+NFKPKUIxpHRooQIgOnIoydSPCu9G7wQuZtg10L48eiII+OrhOr4yLP1YeIo="}],"size":3189,"noattachment":false,"key":"/zames/-/zames-1.1.3.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zames-1.1.3.tgz_1517405996846_0.49835361749865115"},"directories":{},"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":1517405996938,"_cnpm_publish_time":1517405996938,"dist-tags":{"latest":"3.0.0"}}