{"name":"zames","version":"3.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":"madrun test","coverage":"madrun coverage","lint":"madrun lint","fix:lint":"madrun fix:lint","report":"madrun report","watcher":"madrun watcher","watch:test":"madrun watch:test","watch:lint":"madrun watch:lint","watch:tape":"madrun watch:tape","watch:coverage:base":"madrun watch:coverage:base","watch:coverage:tape":"madrun watch:coverage:tape","watch:coverage":"madrun watch:coverage"},"dependencies":{"currify":"^4.0.0","es6-promisify":"^6.0.0"},"license":"MIT","devDependencies":{"coveralls":"^3.0.0","eslint":"^6.4.0","eslint-plugin-node":"^10.0.0","eslint-plugin-putout":"^2.0.0","madrun":"^3.0.5","nodemon":"^1.11.0","nyc":"^14.0.0","putout":"^6.1.0","supertape":"^1.2.3"},"gitHead":"780944609cb0a5ec20d05cf5ebbc198ad29708b0","bugs":{"url":"https://github.com/coderaiser/zames/issues"},"_id":"zames@3.0.0","_nodeVersion":"12.10.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-V/sLIPejcPv2ZJVGjRJU/PeQ58ljL8/1ildkxs+jcsJSJBq7aiO0gJxdarjqY+kujXl0EotfNAvicK8TX+Hk6w==","shasum":"66b4b3817db03c6f09397dcc78bc89f0f58b58b0","tarball":"http://registry-npm.ywwl.com/zames/download/zames-3.0.0.tgz","fileCount":5,"unpackedSize":7227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhLUECRA9TVsSAnZWagAAXRAP/2Ge9ND2XStV2ZwO5Mtq\nTYX7b91GIYcxqc7d9I0NTLn4kIiqfTcSY0Ae6lH4HKmo3o8fmFWiiqQQiX0n\nzuzqkGfKhOPKVGx4PZF8bweTK6GpuyIHboRul5LGgYeAkqfl+LRCzqXawK/o\nZr1eXRm/3c2zGZklkThIBANTKHBtOfpnPXZV4WJpuU8j44lwyKFRxtRyBAOz\nTmH23gm+qByoxHXExvL4SFcDx3F66nxkaGSCWdWqBeGfwQ7NawtZK1LBFuoT\nlND5q7bhVp5+cI3ICoIz6AbtqO1ezctDN+x78U5FGxSJp+z6URsUHxrpJW3P\ntPvbmHW00cdRDhfk4OqghGSNfFe/6kPedLpxk1ljrs6wkgpw6TVrK11QEnOy\nyKJyPP8Z+Fc/nPqnpg62ntiC+KfF9HeduFcJinhpVeBwM5sblDXAcfvGmgOV\nY5I9xa1q/N3QNg9rSKCI7Y0dSKlMU6hbW1rMr3Mt65fgf6CMfdVkGUSDyxDs\nsu72xQq0Wyzd69vQ8H6PFCAjPY9VDnKKK3tztg5iUoqP99119ptX65MV6CXv\nyjaInQWzA88N1X4cezGDaLlZTLhJZjMPV9LuyPFszSAqvJnOmzSNAeoRY0Hb\nc4US5Hyn827aqmzbB+eqkcc6zxJ6xoKTsM9jauSG1q+edByO8pjeSDSGYfRN\nWmZu\r\n=T0os\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHSlVI822LkJubi+B6fY653TU8SkFr2kQUxRukw8USiYAiBymiLqdPeW1FerkLzFy9r/e6OP5FsWvix7DovPlYzmrg=="}],"size":2911,"noattachment":false,"key":"/zames/-/zames-3.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zames_3.0.0_1568978179442_0.7180074136918821"},"_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":1568978179572,"_cnpm_publish_time":1568978179572,"dist-tags":{"latest":"3.0.0"}}