{
"name": "progress",
"version": "1.1.5",
"description": "Flexible ascii progress bar",
"keywords": [
"cli",
"progress"
],
"author": {
"name": "TJ Holowaychuk",
"email": "tj@vision-media.ca"
},
"dependencies": {},
"main": "index",
"engines": {
"node": ">=0.4.0"
},
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/node-progress"
},
"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- `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- `complete` completion character defaulting to \"=\"\n- `incomplete` incomplete character defaulting to \"-\"\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\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('../');\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] :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 [===== ] 29% 3.7s\n```\n\nYou can see more examples in the `examples` folder.\n\n## License\n\nMIT\n",
"readmeFilename": "Readme.md",
"bugs": {
"url": "https://github.com/visionmedia/node-progress/issues"
},
"homepage": "https://github.com/visionmedia/node-progress",
"_id": "progress@1.1.5",
"_shasum": "e6435e6bab45f64ee97287d9c2bc9ccf33e302f3",
"_resolved": "git+https://github.com/nuxlli/node-progress#f9ab9f0f663628ea236ecdd2c7317c48c84fd8d6",
"_from": "progress@git+https://github.com/nuxlli/node-progress"
}