{"name":"zames","version":"1.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","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","legacy:index":"echo \"module.exports = require('./lib/zames');\" > legacy/index.js"},"dependencies":{"currify":"^1.0.0","es6-promisify":"^5.0.0","mkdirp":"^0.5.1"},"license":"MIT","devDependencies":{"browserify":"^13.0.0","buble":"^0.14.2","coveralls":"^2.11.9","eslint":"^3.10.2","minify":"^2.0.5","nodemon":"^1.11.0","nyc":"^9.0.1","redrun":"^5.0.1","tape":"^4.5.1"},"gitHead":"d829687fbfc89d03427c47218e8b1a7e58cdb078","bugs":{"url":"https://github.com/coderaiser/zames/issues"},"_id":"zames@1.0.0","_shasum":"4b0ba84d904b0c3a84a9385640c7104366855b7c","_from":".","_npmVersion":"4.0.1","_nodeVersion":"7.1.0","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"shasum":"4b0ba84d904b0c3a84a9385640c7104366855b7c","tarball":"http://registry-npm.ywwl.com/zames/download/zames-1.0.0.tgz","integrity":"sha512-cHRq4fKwFG72DCFaXDHu2qeN5oZbP7pGxO/xls9vIwQieZ+E1AmH7fzYmYWOz3KhY7HZfzVDcsvOgpApIphYGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyAIVHF+WAsho2ToiR0OY673CYqYovk4eDxND2PEjvlwIhAOQF60Z/LkiY/UWaDpiXE8mNBW0OFHu3Ki/B0722miT6"}],"size":2675,"noattachment":false,"key":"/zames/-/zames-1.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/zames-1.0.0.tgz_1479308157271_0.7480370621196926"},"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":1479308157835,"_cnpm_publish_time":1479308157835,"dist-tags":{"latest":"3.0.0"}}