106 lines
9.1 KiB
JSON
106 lines
9.1 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "are-we-there-yet@~1.1.2",
|
||
|
"scope": null,
|
||
|
"escapedName": "are-we-there-yet",
|
||
|
"name": "are-we-there-yet",
|
||
|
"rawSpec": "~1.1.2",
|
||
|
"spec": ">=1.1.2 <1.2.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/npmlog"
|
||
|
]
|
||
|
],
|
||
|
"_from": "are-we-there-yet@>=1.1.2 <1.2.0",
|
||
|
"_id": "are-we-there-yet@1.1.4",
|
||
|
"_inCache": true,
|
||
|
"_location": "/are-we-there-yet",
|
||
|
"_nodeVersion": "7.7.4",
|
||
|
"_npmOperationalInternal": {
|
||
|
"host": "packages-18-east.internal.npmjs.com",
|
||
|
"tmp": "tmp/are-we-there-yet-1.1.4.tgz_1492760790532_0.2543606413528323"
|
||
|
},
|
||
|
"_npmUser": {
|
||
|
"name": "iarna",
|
||
|
"email": "me@re-becca.org"
|
||
|
},
|
||
|
"_npmVersion": "4.5.0",
|
||
|
"_phantomChildren": {
|
||
|
"core-util-is": "1.0.2",
|
||
|
"inherits": "2.0.3",
|
||
|
"process-nextick-args": "2.0.0",
|
||
|
"safe-buffer": "5.1.1",
|
||
|
"util-deprecate": "1.0.2"
|
||
|
},
|
||
|
"_requested": {
|
||
|
"raw": "are-we-there-yet@~1.1.2",
|
||
|
"scope": null,
|
||
|
"escapedName": "are-we-there-yet",
|
||
|
"name": "are-we-there-yet",
|
||
|
"rawSpec": "~1.1.2",
|
||
|
"spec": ">=1.1.2 <1.2.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/npmlog"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz",
|
||
|
"_shasum": "bb5dca382bb94f05e15194373d16fd3ba1ca110d",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "are-we-there-yet@~1.1.2",
|
||
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/npmlog",
|
||
|
"author": {
|
||
|
"name": "Rebecca Turner",
|
||
|
"url": "http://re-becca.org"
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/iarna/are-we-there-yet/issues"
|
||
|
},
|
||
|
"dependencies": {
|
||
|
"delegates": "^1.0.0",
|
||
|
"readable-stream": "^2.0.6"
|
||
|
},
|
||
|
"description": "Keep track of the overall completion of many disparate processes",
|
||
|
"devDependencies": {
|
||
|
"standard": "^6.0.8",
|
||
|
"tap": "^5.7.0"
|
||
|
},
|
||
|
"directories": {},
|
||
|
"dist": {
|
||
|
"shasum": "bb5dca382bb94f05e15194373d16fd3ba1ca110d",
|
||
|
"tarball": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz"
|
||
|
},
|
||
|
"files": [
|
||
|
"index.js",
|
||
|
"tracker-base.js",
|
||
|
"tracker-group.js",
|
||
|
"tracker-stream.js",
|
||
|
"tracker.js",
|
||
|
"CHANGES.md"
|
||
|
],
|
||
|
"gitHead": "aea89b9c277c0674a2485a3eb94a7269bb2346be",
|
||
|
"homepage": "https://github.com/iarna/are-we-there-yet",
|
||
|
"license": "ISC",
|
||
|
"main": "index.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "iarna",
|
||
|
"email": "me@re-becca.org"
|
||
|
}
|
||
|
],
|
||
|
"name": "are-we-there-yet",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "are-we-there-yet\n----------------\n\nTrack complex hiearchies of asynchronous task completion statuses. This is\nintended to give you a way of recording and reporting the progress of the big\nrecursive fan-out and gather type workflows that are so common in async.\n\nWhat you do with this completion data is up to you, but the most common use case is to\nfeed it to one of the many progress bar modules.\n\nMost progress bar modules include a rudamentary version of this, but my\nneeds were more complex.\n\nUsage\n=====\n\n```javascript\nvar TrackerGroup = require(\"are-we-there-yet\").TrackerGroup\n\nvar top = new TrackerGroup(\"program\")\n\nvar single = top.newItem(\"one thing\", 100)\nsingle.completeWork(20)\n\nconsole.log(top.completed()) // 0.2\n\nfs.stat(\"file\", function(er, stat) {\n if (er) throw er \n var stream = top.newStream(\"file\", stat.size)\n console.log(top.completed()) // now 0.1 as single is 50% of the job and is 20% complete\n // and 50% * 20% == 10%\n fs.createReadStream(\"file\").pipe(stream).on(\"data\", function (chunk) {\n // do stuff with chunk\n })\n top.on(\"change\", function (name) {\n // called each time a chunk is read from \"file\"\n // top.completed() will start at 0.1 and fill up to 0.6 as the file is read\n })\n})\n```\n\nShared Methods\n==============\n\n* var completed = tracker.completed()\n\nImplemented in: `Tracker`, `TrackerGroup`, `TrackerStream`\n\nReturns the ratio of completed work to work to be done. Range of 0 to 1.\n\n* tracker.finish()\n\nImplemented in: `Tracker`, `TrackerGroup`\n\nMarks the tracker as completed. With a TrackerGroup this marks all of its\ncomponents as completed.\n\nMarks all of the components of this tracker as finished, which in turn means\nthat `tracker.completed()` for this will now be 1.\n\nThis will result in one or more `change` events being emitted.\n\nEvents\n======\n\nAll tracker objects emit `change` events with the following arguments:\n\n```\nfunction (name, completed, tracker)\n```\n\n`name` is the name of the tracker that originally emitted the event,\nor if it didn't have one, the first containing tracker group that had one.\n\n`completed` is the percent complete (as returned by `tracker.completed()` method).\n\n`tracker` is the tracker object that you are listening for events on.\n\nTrackerGroup\n============\n\n* var tracker = new TrackerGroup(**name**)\n\n * **name** *(optional)* - The name of this tracker group, used in change\n notifications if the component updating didn't have a name. Defaults to undefined.\n\nCreates a new empty tracker aggregation group. These are trackers whose\ncompletion status is determined by the completion status of other trackers.\n\n* tracker.addUnit(**otherTracker**, **weight**)\n\n * **otherTracker** - Any of the other are-we-there-yet tracker objects\n * **weight** *(optional)* - The weight to give the tracker, defaults to 1.\n\nAdds the **otherTracker** to this aggregation group. The weight determines\nhow long you expect this tracker to take to complete in proportion to other\nunits. So for instance, if you add one tracker with a weight of 1 and\nanother with a weight of 2, you're saying the second will take twice as long\nto complete as the first. As such, the first will account for 33% of the\ncompletion of this tracker and the second will account for the other 67%.\n\nReturns **otherTracker**.\n\n* var subGroup = tracker.newGroup(**name**, **weight**)\n\nThe above is exactly equivalent to:\n\n```javascript\n var subGroup = tracker.addUnit(new TrackerGroup(name), weight)\n```\n\n* var subItem = tracker.newItem(**name**, **todo**, **weight**)\n\nThe above is exactly equivalent to:\n\n```javascript\n var subItem = tracker.addUnit(new Tracker(name, todo), weight)\n```\n\n* var subStream = tracker.newStream(**name**, **todo**, **weight**)\n\nThe above is exactly equivalent to:\n\n```javascript\n var subStream = tracker.addUnit(new TrackerStream(name, todo), weight)\n```\n\n* console.log( tracker.debug() )\n\nReturns a tree showing
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git+https://github.com/iarna/are-we-there-yet.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"test": "standard && tap test/*.js"
|
||
|
},
|
||
|
"version": "1.1.4"
|
||
|
}
|