{ "_args": [ [ { "raw": "progress@^2.0.0", "scope": null, "escapedName": "progress", "name": "progress", "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, "/home/jdaugherty/work/GT2/GT2-Android/node_modules/react-native-scripts" ] ], "_from": "progress@>=2.0.0 <3.0.0", "_id": "progress@2.0.0", "_inCache": true, "_location": "/progress", "_nodeVersion": "6.9.0", "_npmOperationalInternal": { "host": "packages-18-east.internal.npmjs.com", "tmp": "tmp/progress-2.0.0.tgz_1491323693801_0.8384695542044938" }, "_npmUser": { "name": "thebigredgeek", "email": "rhyneandrew@gmail.com" }, "_npmVersion": "4.0.3", "_phantomChildren": {}, "_requested": { "raw": "progress@^2.0.0", "scope": null, "escapedName": "progress", "name": "progress", "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, "_requiredBy": [ "/react-native-scripts" ], "_resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", "_shasum": "8a1be366bf8fc23db2bd23f10c6fe920b4389d1f", "_shrinkwrap": null, "_spec": "progress@^2.0.0", "_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/react-native-scripts", "author": { "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" }, "bugs": { "url": "https://github.com/visionmedia/node-progress/issues" }, "contributors": [ { "name": "Christoffer Hallas", "email": "christoffer.hallas@gmail.com" }, { "name": "Jordan Scales", "email": "scalesjordan@gmail.com" }, { "name": "Andrew Rhyne", "email": "rhyneandrew@gmail.com" } ], "dependencies": {}, "description": "Flexible ascii progress bar", "devDependencies": {}, "directories": {}, "dist": { "shasum": "8a1be366bf8fc23db2bd23f10c6fe920b4389d1f", "tarball": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz" }, "engines": { "node": ">=0.4.0" }, "gitHead": "d84326ed9ab7720592b6bbc9c108849cd2a79908", "homepage": "https://github.com/visionmedia/node-progress#readme", "keywords": [ "cli", "progress" ], "license": "MIT", "main": "./index.js", "maintainers": [ { "name": "hallas", "email": "christoffer.hallas@gmail.com" }, { "name": "prezjordan", "email": "scalesjordan@gmail.com" }, { "name": "thebigredgeek", "email": "rhyneandrew@gmail.com" }, { "name": "thejameskyle", "email": "me@thejameskyle.com" }, { "name": "tjholowaychuk", "email": "tj@vision-media.ca" } ], "name": "progress", "optionalDependencies": {}, "readme": "Flexible ascii progress bar.\n\n## Installation\n\n```bash\n$ npm install progress\n```\n\n## Usage\n\nFirst we create a `ProgressBar`, giving it a format string\nas well as the `total`, telling the progress bar when it will\nbe considered complete. After that all we need to do is `tick()` appropriately.\n\n```javascript\nvar ProgressBar = require('progress');\n\nvar bar = new ProgressBar(':bar', { total: 10 });\nvar timer = setInterval(function () {\n bar.tick();\n if (bar.complete) {\n console.log('\\ncomplete\\n');\n clearInterval(timer);\n }\n}, 100);\n```\n\n### Options\n\nThese are keys in the options object you can pass to the progress bar along with\n`total` as seen in the example above.\n\n- `curr` current completed index\n- `total` total number of ticks to complete\n- `width` the displayed width of the progress bar defaulting to total\n- `stream` the output stream defaulting to stderr\n- `head` head character defaulting to complete character\n- `complete` completion character defaulting to \"=\"\n- `incomplete` incomplete character defaulting to \"-\"\n- `renderThrottle` minimum time between updates in milliseconds defaulting to 16\n- `clear` option to clear the bar on completion defaulting to false\n- `callback` optional function to call when the progress bar completes\n\n### Tokens\n\nThese are tokens you can use in the format of your progress bar.\n\n- `:bar` the progress bar itself\n- `:current` current tick number\n- `:total` total ticks\n- `:elapsed` time elapsed in seconds\n- `:percent` completion percentage\n- `:eta` estimated completion time in seconds\n- `:rate` rate of ticks per second\n\n### Custom Tokens\n\nYou can define custom tokens by adding a `{'name': value}` object parameter to your method (`tick()`, `update()`, etc.) calls.\n\n```javascript\nvar bar = new ProgressBar(':current: :token1 :token2', { total: 3 })\nbar.tick({\n 'token1': \"Hello\",\n 'token2': \"World!\\n\"\n})\nbar.tick(2, {\n 'token1': \"Goodbye\",\n 'token2': \"World!\"\n})\n```\nThe above example would result in the output below.\n\n```\n1: Hello World!\n3: Goodbye World!\n```\n\n## Examples\n\n### Download\n\nIn our download example each tick has a variable influence, so we pass the chunk\nlength which adjusts the progress bar appropriately relative to the total\nlength.\n\n```javascript\nvar ProgressBar = require('progress');\nvar https = require('https');\n\nvar req = https.request({\n host: 'download.github.com',\n port: 443,\n path: '/visionmedia-node-jscoverage-0d4608a.zip'\n});\n\nreq.on('response', function(res){\n var len = parseInt(res.headers['content-length'], 10);\n\n console.log();\n var bar = new ProgressBar(' downloading [:bar] :rate/bps :percent :etas', {\n complete: '=',\n incomplete: ' ',\n width: 20,\n total: len\n });\n\n res.on('data', function (chunk) {\n bar.tick(chunk.length);\n });\n\n res.on('end', function () {\n console.log('\\n');\n });\n});\n\nreq.end();\n```\n\nThe above example result in a progress bar like the one below.\n\n```\ndownloading [===== ] 39/bps 29% 3.7s\n```\n\n### Interrupt\n\nTo display a message during progress bar execution, use `interrupt()`\n```javascript\nvar ProgressBar = require('progress');\n\nvar bar = new ProgressBar(':bar :current/:total', { total: 10 });\nvar timer = setInterval(function () {\n bar.tick();\n if (bar.complete) {\n clearInterval(timer);\n } else if (bar.curr === 5) {\n bar.interrupt('this message appears above the progress bar\\ncurrent progress is ' + bar.curr + '/' + bar.total);\n }\n}, 1000);\n```\n\nYou can see more examples in the `examples` folder.\n\n## License\n\nMIT\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/visionmedia/node-progress.git" }, "scripts": {}, "version": "2.0.0" }