{"_id":"pm2-multimeter","_rev":"10-76b9320974b0af66afbe478d0c8eae05","name":"pm2-multimeter","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.2":{"name":"pm2-multimeter","version":"0.1.2","keywords":["progress","bar","status","meter","terminal","console","ansi"],"author":{"url":"http://substack.net","name":"James Halliday","email":"mail@substack.net"},"license":"MIT/X11","_id":"pm2-multimeter@0.1.2","maintainers":[{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"}],"dist":{"shasum":"1a1e55153d41a05534cea23cfe860abaa0eb4ace","tarball":"https://registry.npmjs.org/pm2-multimeter/-/pm2-multimeter-0.1.2.tgz","integrity":"sha512-S+wT6XfyKfd7SJIBqRgOctGxaBzUOmVQzTAS+cg04TsEUObJVreha7lvCfX8zzGVr871XwCSnHUU7DQQ5xEsfA==","signatures":[{"sig":"MEUCIQCjZJwZT6SEmEz8mqLpGAWgz3NfSDMcfT/5XZ/2gcfJbAIgX4flnfQYCAHw4LnUEUWqXctgAvdnS9100U9EEl7jY9g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","engine":{"node":">=0.4"},"readme":"multimeter\n==========\n\nControl multiple ANSI progress bars on the terminal.\n\n![multibar example output](http://substack.net/images/screenshots/multibar.png)\n\n![multimeter](http://substack.net/images/multimeter.png)\n\nexample\n=======\n\n````javascript\nvar multimeter = require('multimeter');\nvar multi = multimeter(process);\n\nmulti.drop(function (bar) {\n var iv = setInterval(function () {\n var p = bar.percent();\n bar.percent(p + 1);\n \n if (p >= 100) clearInterval(iv);\n }, 25);\n});\n````\n\nmethods\n=======\n\nvar multimeter = require('multimeter');\n\nvar multi = multimeter(stream, ...)\n-----------------------------------\n\nCreate a new multimeter handle on the supplied stream/process objects, which\nwill be passed directly to [charm](https://github.com/substack/node-charm).\n\nIf you pass in a charm object that will be used instead of creating a new one.\n\nvar bar = multi(x, y, params)\n-----------------------------\n\nCreate a new progress bar at `(x,y)` with `params` which default to:\n\n* width : 10\n* before : '['\n* after : '] '\n* solid : { background : 'blue', foreground : 'white', text : '|' }\n* empty : { background : null, foreground : null, text : ' ' }\n\nIf `y` is negative or `'-0'` it will be treated as a relative coordinate.\n\nvar bar = multi.rel(x, y, params)\n---------------------------------\n\nCreate a new progress bar at an absolute `x` and relative `y` coordinate with\nrespect to the present `multi.offset`.\n\nmulti.drop(params, cb)\n----------------------\n\nCreate a new progress bar at the present cursor location. The `bar` object will\nbe passed to `cb(bar)` once the cursor location has been determined. \n\nmulti.on(...), multi.removeListener(...), multi.destroy(...), multi.write(...)\n------------------------------------------------------------------------------\n\nCall event emitter functions on the underlying `charm` object.\n\nmulti.offset\n------------\n\nThis getter/setter controls the positioning for relative progress bars.\n\nIncrement this value whenever you write a newline to the stream to prevent the\npending progress bars from drifting down from their original positions.\n\nbar.percent(p, msg=p + ' %')\n----------------------------\n\nUpdate the progress bar to `p` percent, a value between 0 and 100, inclusive.\n\nThe text to the right of the progress bar will be set to `msg`.\n\nbar.ratio(n, d, msg=n + ' / ' + d)\n----------------------------------\n\nUpdate the progress bar with a ratio, `n/d`.\n\nThe text to the right of the progress bar will be set to `msg`.\n\nattributes\n==========\n\nmulti.charm\n-----------\n\nThe [charm](https://github.com/substack/node-charm) object used internally to\ndraw the progress bars.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n npm install multimeter\n","_npmUser":{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"},"repository":{"url":"https://github.com/Unitech/node-multimeter.git","type":"git"},"_npmVersion":"1.2.0","description":"render multiple progress bars at once on the terminal with eventlimit maxed","directories":{"lib":".","test":"test","example":"example"},"dependencies":{"charm":"~0.1.1"},"readmeFilename":"README.markdown"}},"time":{"created":"2013-07-16T09:06:45.335Z","modified":"2025-02-02T20:46:53.079Z","0.1.2":"2013-07-16T09:06:47.541Z"},"author":{"url":"http://substack.net","name":"James Halliday","email":"mail@substack.net"},"repository":{"url":"https://github.com/Unitech/node-multimeter.git","type":"git"},"description":"render multiple progress bars at once on the terminal with eventlimit maxed","keywords":["progress","bar","status","meter","terminal","console","ansi"],"license":"MIT/X11","maintainers":[{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"}],"readme":"multimeter\n==========\n\nControl multiple ANSI progress bars on the terminal.\n\n![multibar example output](http://substack.net/images/screenshots/multibar.png)\n\n![multimeter](http://substack.net/images/multimeter.png)\n\nexample\n=======\n\n````javascript\nvar multimeter = require('multimeter');\nvar multi = multimeter(process);\n\nmulti.drop(function (bar) {\n var iv = setInterval(function () {\n var p = bar.percent();\n bar.percent(p + 1);\n \n if (p >= 100) clearInterval(iv);\n }, 25);\n});\n````\n\nmethods\n=======\n\nvar multimeter = require('multimeter');\n\nvar multi = multimeter(stream, ...)\n-----------------------------------\n\nCreate a new multimeter handle on the supplied stream/process objects, which\nwill be passed directly to [charm](https://github.com/substack/node-charm).\n\nIf you pass in a charm object that will be used instead of creating a new one.\n\nvar bar = multi(x, y, params)\n-----------------------------\n\nCreate a new progress bar at `(x,y)` with `params` which default to:\n\n* width : 10\n* before : '['\n* after : '] '\n* solid : { background : 'blue', foreground : 'white', text : '|' }\n* empty : { background : null, foreground : null, text : ' ' }\n\nIf `y` is negative or `'-0'` it will be treated as a relative coordinate.\n\nvar bar = multi.rel(x, y, params)\n---------------------------------\n\nCreate a new progress bar at an absolute `x` and relative `y` coordinate with\nrespect to the present `multi.offset`.\n\nmulti.drop(params, cb)\n----------------------\n\nCreate a new progress bar at the present cursor location. The `bar` object will\nbe passed to `cb(bar)` once the cursor location has been determined. \n\nmulti.on(...), multi.removeListener(...), multi.destroy(...), multi.write(...)\n------------------------------------------------------------------------------\n\nCall event emitter functions on the underlying `charm` object.\n\nmulti.offset\n------------\n\nThis getter/setter controls the positioning for relative progress bars.\n\nIncrement this value whenever you write a newline to the stream to prevent the\npending progress bars from drifting down from their original positions.\n\nbar.percent(p, msg=p + ' %')\n----------------------------\n\nUpdate the progress bar to `p` percent, a value between 0 and 100, inclusive.\n\nThe text to the right of the progress bar will be set to `msg`.\n\nbar.ratio(n, d, msg=n + ' / ' + d)\n----------------------------------\n\nUpdate the progress bar with a ratio, `n/d`.\n\nThe text to the right of the progress bar will be set to `msg`.\n\nattributes\n==========\n\nmulti.charm\n-----------\n\nThe [charm](https://github.com/substack/node-charm) object used internally to\ndraw the progress bars.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n npm install multimeter\n","users":{"thr0w":true,"mastayoda":true,"markthethomas":true}}