{"_id":"charm","_rev":"42009","name":"charm","description":"ansi control sequences for terminal cursor hopping and colors","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"time":{"modified":"2021-06-03T10:12:42.000Z","created":"2011-08-13T14:13:30.244Z","1.0.2":"2016-12-03T21:48:15.103Z","1.0.1":"2016-05-02T14:04:43.662Z","1.0.0":"2014-09-19T12:27:18.439Z","0.2.1":"2014-09-19T12:26:24.794Z","0.2.0":"2013-12-09T18:58:50.876Z","0.1.2":"2013-04-07T07:16:55.093Z","0.1.1":"2013-02-14T22:42:37.956Z","0.1.0":"2012-05-11T00:25:01.763Z","0.0.8":"2012-05-06T08:35:53.808Z","0.0.7":"2012-04-30T08:31:28.459Z","0.0.6":"2012-02-21T23:27:31.333Z","0.0.5":"2011-08-24T10:49:09.678Z","0.0.4":"2011-08-15T05:28:47.774Z","0.0.3":"2011-08-15T03:07:26.109Z","0.0.2":"2011-08-14T22:16:50.504Z","0.0.1":"2011-08-14T12:49:50.258Z","0.0.0":"2011-08-13T14:13:30.244Z"},"users":{"coverslide":true,"fgribreau":true,"parroit":true,"tur-nr":true,"eins78":true,"j3kz":true,"pilsy":true,"monolithed":true,"chbrown":true,"laggingreflex":true,"spywhere":true,"ahmed-dinar":true,"scottfreecode":true,"akiva":true,"quocnguyen":true,"detj":true},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"repository":{"type":"git","url":"git+ssh://git@github.com/substack/node-charm.git"},"versions":{"1.0.2":{"name":"charm","version":"1.0.2","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git+ssh://git@github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"dependencies":{"inherits":"^2.0.1"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","engine":{"node":">=0.4"},"gitHead":"1f68b8a4cf3375f15dd01e2a0f7318ee37c58c75","bugs":{"url":"https://github.com/substack/node-charm/issues"},"homepage":"https://github.com/substack/node-charm#readme","_id":"charm@1.0.2","scripts":{},"_shasum":"8add367153a6d9a581331052c4090991da995e35","_from":".","_npmVersion":"3.10.7","_nodeVersion":"6.5.0","_npmUser":{"name":"noffle","email":"stephen.whitmore@gmail.com"},"dist":{"shasum":"8add367153a6d9a581331052c4090991da995e35","size":5304,"noattachment":false,"key":"/charm/-/charm-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-1.0.2.tgz"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/charm-1.0.2.tgz_1480801694868_0.3569797039963305"},"publish_time":1480801695103,"_cnpm_publish_time":1480801695103,"_hasShrinkwrap":false},"1.0.1":{"name":"charm","version":"1.0.1","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git+ssh://git@github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"dependencies":{"inherits":"^2.0.1"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"gitHead":"00fa363baf14135c5f13b7b0b3c77f34dd72e3fa","bugs":{"url":"https://github.com/substack/node-charm/issues"},"homepage":"https://github.com/substack/node-charm#readme","_id":"charm@1.0.1","scripts":{},"_shasum":"68566a7a553d4fe91797030dd1852d0dd6efa82d","_from":".","_npmVersion":"3.7.1","_nodeVersion":"5.5.0","_npmUser":{"name":"substack","email":"substack@gmail.com"},"dist":{"shasum":"68566a7a553d4fe91797030dd1852d0dd6efa82d","size":5316,"noattachment":false,"key":"/charm/-/charm-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-1.0.1.tgz"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/charm-1.0.1.tgz_1462197882555_0.11786545184440911"},"publish_time":1462197883662,"_cnpm_publish_time":1462197883662,"_hasShrinkwrap":false},"1.0.0":{"name":"charm","version":"1.0.0","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"http://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"gitHead":"72dab6be73e5069ab836359e1afd51fca2bfca40","bugs":{"url":"https://github.com/substack/node-charm/issues"},"homepage":"https://github.com/substack/node-charm","_id":"charm@1.0.0","scripts":{},"_shasum":"6cfb69ddcc3d648528615bd2e9ffe14fb970b9ae","_from":".","_npmVersion":"1.4.25","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"dist":{"shasum":"6cfb69ddcc3d648528615bd2e9ffe14fb970b9ae","size":5697,"noattachment":false,"key":"/charm/-/charm-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-1.0.0.tgz"},"publish_time":1411129638439,"_cnpm_publish_time":1411129638439,"_hasShrinkwrap":false},"0.2.1":{"name":"charm","version":"0.2.1","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"http://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"gitHead":"eeff7d971d71faf52954fbbb7fb379599312bebe","bugs":{"url":"https://github.com/substack/node-charm/issues"},"homepage":"https://github.com/substack/node-charm","_id":"charm@0.2.1","scripts":{},"_shasum":"41bcc1e86ac4baeefa466561c50c37dd6eef8899","_from":".","_npmVersion":"1.4.25","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"dist":{"shasum":"41bcc1e86ac4baeefa466561c50c37dd6eef8899","size":5695,"noattachment":false,"key":"/charm/-/charm-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.2.1.tgz"},"publish_time":1411129584794,"_cnpm_publish_time":1411129584794,"_hasShrinkwrap":false},"0.2.0":{"name":"charm","version":"0.2.0","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"http://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"bugs":{"url":"https://github.com/substack/node-charm/issues"},"homepage":"https://github.com/substack/node-charm","_id":"charm@0.2.0","dist":{"shasum":"bacd06d8717759362f7a662a1e967af7537fda8b","size":5627,"noattachment":false,"key":"/charm/-/charm-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1386615530876,"_hasShrinkwrap":false,"_cnpm_publish_time":1386615530876},"0.1.2":{"name":"charm","version":"0.1.2","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"http://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"charm@0.1.2","dist":{"shasum":"06c21eed1a1b06aeb67553cdc53e23274bac2296","size":5331,"noattachment":false,"key":"/charm/-/charm-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.1.2.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1365319015093,"_hasShrinkwrap":false,"_cnpm_publish_time":1365319015093},"0.1.1":{"name":"charm","version":"0.1.1","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"http://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"charm@0.1.1","dist":{"shasum":"873499ca639ed97beb284211e3b8d09126d45435","size":5329,"noattachment":false,"key":"/charm/-/charm-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.1.1.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1360881757956,"_hasShrinkwrap":false,"_cnpm_publish_time":1360881757956},"0.1.0":{"name":"charm","version":"0.1.0","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"charm@0.1.0","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.19","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"7fbcc2a7a24c116ccc97e7762c216697d0c6f788","size":4822,"noattachment":false,"key":"/charm/-/charm-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.1.0.tgz"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1336695901763,"_hasShrinkwrap":false,"_cnpm_publish_time":1336695901763},"0.0.8":{"name":"charm","version":"0.0.8","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"charm@0.0.8","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.19","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"88f20070511905ea7aa54c2e655f170530a84c96","size":4781,"noattachment":false,"key":"/charm/-/charm-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.0.8.tgz"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1336293353808,"_hasShrinkwrap":false,"_cnpm_publish_time":1336293353808},"0.0.7":{"name":"charm","version":"0.0.7","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"charm@0.0.7","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"f36748fa2fc4d09952384ad2ec802208a2c3f252","size":4630,"noattachment":false,"key":"/charm/-/charm-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.0.7.tgz"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1335774688459,"_hasShrinkwrap":false,"_cnpm_publish_time":1335774688459},"0.0.6":{"name":"charm","version":"0.0.6","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"charm@0.0.6","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"06fee14a4afb0869d46052db5087c905e52fb457","size":4540,"noattachment":false,"key":"/charm/-/charm-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.0.6.tgz"},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1329866851333,"_hasShrinkwrap":false,"_cnpm_publish_time":1329866851333},"0.0.5":{"name":"charm","version":"0.0.5","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"charm@0.0.5","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.10","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"302ee9c2b4accc52fb32e3fe5c755ed3f873578b","size":4395,"noattachment":false,"key":"/charm/-/charm-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.0.5.tgz"},"scripts":{},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1314182949678,"_hasShrinkwrap":false,"_cnpm_publish_time":1314182949678},"0.0.4":{"name":"charm","version":"0.0.4","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"charm@0.0.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.10","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"811afabb864e62e710d49c63cf4c82a97a27a290","size":4280,"noattachment":false,"key":"/charm/-/charm-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.0.4.tgz"},"scripts":{},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1313386127774,"_hasShrinkwrap":false,"_cnpm_publish_time":1313386127774},"0.0.3":{"name":"charm","version":"0.0.3","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"charm@0.0.3","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.10","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"999564147e1d758b61dff3a6c952f314960ed5ed","size":4229,"noattachment":false,"key":"/charm/-/charm-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.0.3.tgz"},"scripts":{},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1313377646109,"_hasShrinkwrap":false,"_cnpm_publish_time":1313377646109},"0.0.2":{"name":"charm","version":"0.0.2","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"charm@0.0.2","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.10","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"186e8abdc967f7018666c54ab087d6ff373a84ce","size":4226,"noattachment":false,"key":"/charm/-/charm-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.0.2.tgz"},"scripts":{},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1313360210504,"_hasShrinkwrap":false,"_cnpm_publish_time":1313360210504},"0.0.1":{"name":"charm","version":"0.0.1","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"charm@0.0.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.10","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"4a201b40e1da77a5b2e91696aa908a185245e700","size":3795,"noattachment":false,"key":"/charm/-/charm-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.0.1.tgz"},"scripts":{},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1313326190258,"_hasShrinkwrap":false,"_cnpm_publish_time":1313326190258},"0.0.0":{"name":"charm","version":"0.0.0","description":"ansi control sequences for terminal cursor hopping and colors","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"repository":{"type":"git","url":"git://github.com/substack/node-charm.git"},"keywords":["terminal","ansi","cursor","color","console","control","escape","sequence"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"charm@0.0.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.10","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"01348dfb4f891e5147b1300bf2cfb8a7ca1d1e56","size":3800,"noattachment":false,"key":"/charm/-/charm-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/charm/download/charm-0.0.0.tgz"},"scripts":{},"maintainers":[{"name":"noffle","email":"stephen.whitmore@gmail.com"}],"publish_time":1313244810244,"_hasShrinkwrap":false,"_cnpm_publish_time":1313244810244}},"readme":"charm\n=====\n\nUse\n[ansi terminal characters](http://www.termsys.demon.co.uk/vtansi.htm)\nto write colors and cursor positions.\n\n![me lucky charms](http://substack.net/images/charms.png)\n\nexample\n=======\n\nlucky\n-----\n\n````javascript\nvar charm = require('charm')();\ncharm.pipe(process.stdout);\ncharm.reset();\n\nvar colors = [ 'red', 'cyan', 'yellow', 'green', 'blue' ];\nvar text = 'Always after me lucky charms.';\n\nvar offset = 0;\nvar iv = setInterval(function () {\n    var y = 0, dy = 1;\n    for (var i = 0; i < 40; i++) {\n        var color = colors[(i + offset) % colors.length];\n        var c = text[(i + offset) % text.length];\n        charm\n            .move(1, dy)\n            .foreground(color)\n            .write(c)\n        ;\n        y += dy;\n        if (y <= 0 || y >= 5) dy *= -1;\n    }\n    charm.position(0, 1);\n    offset ++;\n}, 150);\n````\n\nevents\n======\n\nCharm objects pass along the data events from their input stream except for\nevents generated from querying the terminal device.\n\nBecause charm puts stdin into raw mode, charm emits two special events: \"^C\" and\n\"^D\" when the user types those combos. It's super convenient with these events\nto do:\n\n````javascript\ncharm.on('^C', process.exit)\n````\n\nThe above is set on all `charm` streams. If you want to add your own handling for these\nspecial events simply:\n\n````javascript\ncharm.removeAllListeners('^C')\ncharm.on('^C', function () {\n  // Don't exit. Do some mad science instead.\n})\n````\n\nmethods\n=======\n\nvar charm = require('charm')(param or stream, ...)\n--------------------------------------------------\n\nCreate a new readable/writable `charm` stream.\n\nYou can pass in readable or writable streams as parameters and they will be\npiped to or from accordingly. You can also pass `process` in which case\n`process.stdin` and `process.stdout` will be used.\n\nYou can `pipe()` to and from the `charm` object you get back.\n\ncharm.reset()\n-------------\n\nReset the entire screen, like the /usr/bin/reset command.\n\ncharm.destroy(), charm.end()\n----------------------------\n\nEmit an `\"end\"` event downstream.\n\ncharm.write(msg)\n----------------\n\nPass along `msg` to the output stream.\n\ncharm.position(x, y)\n--------------------\n\nSet the cursor position to the absolute coordinates `x, y`.\n\ncharm.position(cb)\n------------------\n\nQuery the absolute cursor position from the input stream through the output\nstream (the shell does this automatically) and get the response back as\n`cb(x, y)`.\n\ncharm.move(x, y)\n----------------\n\nMove the cursor position by the relative coordinates `x, y`.\n\ncharm.up(y)\n-----------\n\nMove the cursor up by `y` rows.\n\ncharm.down(y)\n-------------\n\nMove the cursor down by `y` rows.\n\ncharm.left(x)\n-------------\n\nMove the cursor left by `x` columns.\n\ncharm.right(x)\n--------------\n\nMove the cursor right by `x` columns.\n\ncharm.push(withAttributes=false)\n--------------------------------\n\nPush the cursor state and optionally the attribute state.\n\ncharm.pop(withAttributes=false)\n-------------------------------\n\nPop the cursor state and optionally the attribute state.\n\ncharm.erase(s)\n--------------\n\nErase a region defined by the string `s`.\n\n`s` can be:\n\n* end - erase from the cursor to the end of the line\n* start - erase from the cursor to the start of the line\n* line - erase the current line\n* down - erase everything below the current line\n* up - erase everything above the current line\n* screen - erase the entire screen\n\ncharm.delete(mode, n)\n---------------------\nDelete `'line'` or `'char'`s. `delete` differs from erase\nbecause it does not write over the deleted characters with whitesapce,\nbut instead removes the deleted space.\n\n`mode` can be `'line'` or `'char'`. `n` is the number of items to be deleted.\n`n` must be a positive integer.\n\nThe cursor position is not updated.\n\ncharm.insert(mode, n)\n---------------------\n\nInsert space into the terminal. `insert` is the opposite of` delete`,\nand the arguments are the same.\n\ncharm.display(attr)\n-------------------\n\nSet the display mode with the string `attr`.\n\n`attr` can be:\n\n* reset\n* bright\n* dim\n* underscore\n* blink\n* reverse\n* hidden\n\ncharm.foreground(color)\n-----------------------\n\nSet the foreground color with the string `color`, which can be:\n\n* red\n* yellow\n* green\n* blue\n* cyan\n* magenta\n* black\n* white\n\nor `color` can be an integer from 0 to 255, inclusive.\n\ncharm.background(color)\n-----------------------\n\nSet the background color with the string `color`, which can be:\n\n* red\n* yellow\n* green\n* blue\n* cyan\n* magenta\n* black\n* white\n\nor `color` can be an integer from 0 to 255, inclusive.\n\ncharm.cursor(visible)\n---------------------\n\nSet the cursor visibility with a boolean `visible`.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install charm\n```\n","_attachments":{},"homepage":"https://github.com/substack/node-charm#readme","bugs":{"url":"https://github.com/substack/node-charm/issues"},"license":"MIT"}