GT2/GT2-Android/node_modules/denodeify/package.json

95 lines
6.5 KiB
JSON

{
"_args": [
[
{
"raw": "denodeify@^1.2.1",
"scope": null,
"escapedName": "denodeify",
"name": "denodeify",
"rawSpec": "^1.2.1",
"spec": ">=1.2.1 <2.0.0",
"type": "range"
},
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/react-native"
]
],
"_from": "denodeify@>=1.2.1 <2.0.0",
"_id": "denodeify@1.2.1",
"_inCache": true,
"_location": "/denodeify",
"_nodeVersion": "0.10.33",
"_npmUser": {
"name": "mattandrews",
"email": "matt@mattandre.ws"
},
"_npmVersion": "2.1.14",
"_phantomChildren": {},
"_requested": {
"raw": "denodeify@^1.2.1",
"scope": null,
"escapedName": "denodeify",
"name": "denodeify",
"rawSpec": "^1.2.1",
"spec": ">=1.2.1 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/metro",
"/react-native"
],
"_resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz",
"_shasum": "3a36287f5034e699e7577901052c2e6c94251631",
"_shrinkwrap": null,
"_spec": "denodeify@^1.2.1",
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/react-native",
"author": {
"name": "Matt Andrews"
},
"bugs": {
"url": "https://github.com/matthew-andrews/denodeify/issues"
},
"dependencies": {},
"description": "Tool to turn functions with Node-style callback APIs into functions that return Promises",
"devDependencies": {
"es6-promise": "^1.0.0",
"es6-shim": "^0.18.0",
"jshint": "^2.5.5",
"lie": "^2.7.7",
"lintspaces-cli": "0.0.4",
"mocha": "^1.21.4",
"native-promise-only": "^0.7.6-a"
},
"directories": {
"test": "test"
},
"dist": {
"shasum": "3a36287f5034e699e7577901052c2e6c94251631",
"tarball": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz"
},
"gitHead": "e500054eb336c748264507e9553af949981ee2c3",
"homepage": "https://github.com/matthew-andrews/denodeify",
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "mattandrews",
"email": "matt@mattandre.ws"
}
],
"name": "denodeify",
"optionalDependencies": {},
"readme": "denodeify [ ![Codeship Status for matthew-andrews/denodeify](https://codeship.io/projects/02ac77d0-1a58-0132-bf86-4a07366ee29d/status)](https://codeship.io/projects/34622)\n=========\n\nTool to turn functions with Node-style callback APIs into functions that return [Promises](https://github.com/jakearchibald/es6-promise).\n\nInspired by and adapted from Q's [`Q.denodeify`/`Q.nfcall` function](https://github.com/kriskowal/q/wiki/API-Reference#qnfbindnodefunc-args).\n\nWarning: This micro-library doesn't force you to use any particular Promise implementation by using whatever `Promise` has been defined as globally. This is so that you may use any ES6 standard Promise compliant library - or, of course, native ES6 Promises.\n\nIf you're running the code on a browser or node version that doesn't include native promises you will need to include a polyfill. The following polyfills are tested as part of this module's test suite:-\n- [Jake Archibald](https://twitter.com/jaffathecake)'s [ES6 Promise library](https://github.com/jakearchibald/es6-promise) (which is actually adapted from [Stefan Penner](https://twitter.com/stefanpenner)'s [RSVP.js](https://github.com/tildeio/rsvp.js)). - `require('es6-promise').polyfill();`\n- [Getify](https://twitter.com/getify)'s [Native Promise Only library](https://github.com/getify/native-promise-only) - `require('native-promise-only');`\n- [ES6 Shim](https://github.com/es-shims/es6-shim) - `require('es6-shim');`\n- [Calvin Metcalf](https://twitter.com/CWMma)'s [Lie](https://github.com/calvinmetcalf/lie) - `global.Promise = global.Promise || require('lie');`\n\nNote: as of v1.2.0 you can use **denodeify** in the front end. Pull it in via CommonJS, AMD or simply add to your webpage and it'll be available on `window.denodeify`. \n\n## Installation\n\n```\nnpm install denodeify --save\n```\n\nOr:-\n\n```\nbower install denodeify --save\n```\n\n## Examples\n\nSimple example with [`readFile`](https://www.npmjs.org/package/read-file):-\n\n```js\nrequire('es6-promise').polyfill();\n\nvar denodeify = require('denodeify');\nvar readFile = denodeify(require('fs').readFile);\n\nreadFile('my-file.txt', { encoding: 'UTF-8' })\n .then(function(text) {\n console.log(\"My file's contents is: \" + text);\n });\n```\n\n(Note: you will need to also install [es6-promise](https://github.com/jakearchibald/es6-promise) with `npm install es6-promise` for this code sample to work within node versions that don't have `Promise` natively available)\n\nMore complex example with `exec`:-\n\n## Advanced usage\n\nYou can also pass in a function as a second argument of `denodeify` that allows you to manipulate the data returned by the wrapped function before it gets passed to the Promise's `reject` or `resolve` functions, for example:-\n\n```js\nrequire('es6-promise').polyfill();\n\nvar denodeify = require('denodeify');\nvar exec = denodeify(require('child_process').exec, function(err, stdout, stderr) {\n\n // Throw away stderr data\n return [err, stdout];\n});\n\nexec('hostname')\n .then(function(host) {\n console.log(\"My hostname is: \" + host.replace('\\n', ''));\n });\n```\n\nOr,\n\n```js\nrequire('es6-promise').polyfill();\n\nvar denodeify = require('denodeify');\nvar exec = denodeify(require('child_process').exec, function(err, stdout, stderr) {\n return [err, [stdout, stderr]];\n});\n\nexec('my-command')\n .then(function(results) {\n console.log(\"stdout is: \" + results[0]);\n console.log(\"stderr is: \" + results[1]);\n });\n```\n\nUseful for functions that return multiple arguments, for example [`child_process#exec`](http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback).\n\n## Credits and collaboration ##\n\nThe lead developer of **denodeify** is [Matt Andrews](http://twitter.com/andrewsmatt) at FT Labs with much help and support from [Kornel Lesiński](https://twitter.com/pornelski). All open source code released by FT Labs is licenced under the MIT licence. We welcome comments, feedback and suggestions. Please feel free to raise an issue or pull request.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/matthew-andrews/denodeify.git"
},
"scripts": {
"files": "find . -name '*.js' ! -path './node_modules/*'",
"jshint": "jshint `npm run -s files`",
"lintspaces": "lintspaces -i js-comments -e .editorconfig `npm run -s files`",
"test": "mocha test/*test.js && npm run jshint && npm run lintspaces"
},
"version": "1.2.1"
}