canonical
Version:
Canonical code style linter and formatter for JavaScript, SCSS and CSS.
64 lines (63 loc) • 3.13 kB
JSON
{
"_args": [
[
"run-async@https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
"/Users/gajus/Documents/dev/canonical-code-style/canonical"
]
],
"_from": "run-async@>=0.1.0 <0.2.0",
"_id": "run-async@0.1.0",
"_inCache": true,
"_location": "/run-async",
"_phantomChildren": {},
"_requested": {
"name": "run-async",
"raw": "run-async@https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
"rawSpec": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
"type": "remote"
},
"_requiredBy": [
"/inquirer"
],
"_resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
"_shasum": "c8ad4a5e110661e402a7d21b530e009f25f8e389",
"_shrinkwrap": null,
"_spec": "run-async@https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
"_where": "/Users/gajus/Documents/dev/canonical-code-style/canonical",
"author": {
"email": "admin@simonboudrias.com",
"name": "Simon Boudrias"
},
"bugs": {
"url": "https://github.com/SBoudrias/run-async/issues"
},
"dependencies": {
"once": "^1.3.0"
},
"description": "Utility method to run function either synchronously or asynchronously using the common `this.async()` style.",
"devDependencies": {
"mocha": "^1.21.4"
},
"homepage": "https://github.com/SBoudrias/run-async",
"keywords": [
"async",
"flow",
"flow-control"
],
"license": "MIT",
"main": "index.js",
"name": "run-async",
"optionalDependencies": {},
"readme": "Run Async\n=========\n\n[](http://badge.fury.io/js/run-async) [](http://travis-ci.org/SBoudrias/run-async) [](https://david-dm.org/SBoudrias/run-async)\n\nUtility method to run function either synchronously or asynchronously using the common `this.async()` style.\n\nThis is useful for library author accepting sync or async functions as parameter. `runAsync` will always run them as async method, and normalize the function handling.\n\nInstallation\n=========\n\n```bash\nnpm install --save run-async\n```\n\nUsage\n=========\n\n```js\nvar runAsync = require('run-async');\n\n// In Async mode:\nvar asyncFn = function (a) {\n var done = this.async();\n\n setTimeout(function () {\n done('running: ' + a);\n }, 10);\n};\n\nrunAsync(asyncFn, function (answer) {\n console.log(answer); // 'running: async'\n}, 'async');\n\n// In Sync mode:\nvar syncFn = function (a) {\n return 'running: ' + a;\n};\n\nrunAsync(asyncFn, function (answer) {\n console.log(answer); // 'running: sync'\n}, 'sync');\n```\n\nLicence\n========\n\nCopyright (c) 2014 Simon Boudrias (twitter: @vaxilart) \nLicensed under the MIT license.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/SBoudrias/run-async.git"
},
"scripts": {
"test": "mocha -R spec"
},
"version": "0.1.0"
}