{"_id":"pm2-multimeter","_rev":"2770402","name":"pm2-multimeter","description":"render multiple progress bars at once on the terminal with eventlimit maxed","dist-tags":{"latest":"0.1.2"},"maintainers":[{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"}],"time":{"modified":"2022-05-23T09:38:53.000Z","created":"2013-07-16T09:06:47.541Z","0.1.2":"2013-07-16T09:06:47.541Z"},"users":{},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"repository":{"type":"git","url":"https://github.com/Unitech/node-multimeter.git"},"versions":{"0.1.2":{"name":"pm2-multimeter","version":"0.1.2","description":"render multiple progress bars at once on the terminal with eventlimit maxed","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"dependencies":{"charm":"~0.1.1"},"repository":{"type":"git","url":"https://github.com/Unitech/node-multimeter.git"},"keywords":["progress","bar","status","meter","terminal","console","ansi"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"readmeFilename":"README.markdown","_id":"pm2-multimeter@0.1.2","dist":{"shasum":"1a1e55153d41a05534cea23cfe860abaa0eb4ace","size":3958,"noattachment":false,"key":"/pm2-multimeter/-/pm2-multimeter-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pm2-multimeter/download/pm2-multimeter-0.1.2.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"},"maintainers":[{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"}],"publish_time":1373965607541,"_hasShrinkwrap":false,"_cnpm_publish_time":1373965607541,"_cnpmcore_publish_time":"2021-12-17T00:32:09.542Z"}},"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","_attachments":{},"readmeFilename":"README.markdown","license":"MIT/X11"}