{"_id":"wide-align","_rev":"1259424","name":"wide-align","description":"A wide-character aware text alignment function for use on the console or with fixed width fonts.","dist-tags":{"latest":"1.1.5"},"maintainers":[{"name":"iarna","email":""}],"time":{"modified":"2021-10-15T14:21:00.000Z","created":"2015-12-16T05:58:03.765Z","1.1.5":"2021-10-15T14:17:01.529Z","1.1.3":"2018-05-24T21:36:50.718Z","1.1.2":"2017-05-11T18:31:29.686Z","1.1.1":"2017-05-10T23:21:02.976Z","1.1.0":"2016-01-08T21:59:38.349Z","1.0.2":"2015-12-31T07:07:16.373Z","1.0.1":"2015-12-16T19:55:49.801Z","1.0.0":"2015-12-16T05:58:03.765Z"},"users":{"iarna":true},"author":{"name":"Rebecca Turner","email":"me@re-becca.org","url":"http://re-becca.org/"},"repository":{"type":"git","url":"git+https://github.com/iarna/wide-align.git"},"versions":{"1.1.5":{"name":"wide-align","version":"1.1.5","description":"A wide-character aware text alignment function for use on the console or with fixed width fonts.","main":"align.js","scripts":{"test":"tap --coverage test/*.js"},"keywords":["wide","double","unicode","cjkv","pad","align"],"author":{"name":"Rebecca Turner","email":"me@re-becca.org","url":"http://re-becca.org/"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/iarna/wide-align.git"},"//":"But not version 5 of string-width, as that's ESM only","dependencies":{"string-width":"^1.0.2 || 2 || 3 || 4"},"devDependencies":{"tap":"*"},"gitHead":"c1bf09df8a2c549d68a7a0e65315db89d0eff457","bugs":{"url":"https://github.com/iarna/wide-align/issues"},"homepage":"https://github.com/iarna/wide-align#readme","_id":"wide-align@1.1.5","_nodeVersion":"13.13.0","_npmVersion":"6.14.4","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"df1d4c206854369ecf3c9a4898f1b23fbd9d15d3","size":1994,"noattachment":false,"key":"/wide-align/-/wide-align-1.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/wide-align/download/wide-align-1.1.5.tgz"},"directories":{},"maintainers":[{"name":"iarna","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wide-align_1.1.5_1634307421358_0.6415138028065521"},"_hasShrinkwrap":false,"publish_time":1634307421529,"_cnpm_publish_time":1634307421529},"1.1.3":{"name":"wide-align","version":"1.1.3","description":"A wide-character aware text alignment function for use on the console or with fixed width fonts.","main":"align.js","scripts":{"test":"tap --coverage test/*.js","version":"perl -pi -e 's/^(  \"version\": $ENV{npm_config_node_version}\").*?\",/$1abc\",/' package-lock.json ; git add package-lock.json"},"keywords":["wide","double","unicode","cjkv","pad","align"],"author":{"name":"Rebecca Turner","email":"me@re-becca.org","url":"http://re-becca.org/"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/iarna/wide-align.git"},"dependencies":{"string-width":"^1.0.2 || 2"},"devDependencies":{"tap":"10 || 11 || 12"},"files":["align.js"],"gitHead":"6b766c9874a1e5157eda2ac75b90ccc01b313620","bugs":{"url":"https://github.com/iarna/wide-align/issues"},"homepage":"https://github.com/iarna/wide-align#readme","_id":"wide-align@1.1.3","_npmVersion":"6.1.0","_nodeVersion":"9.3.0","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"ae074e6bdc0c14a431e804e624549c633b000457","size":2040,"noattachment":false,"key":"/wide-align/-/wide-align-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/wide-align/download/wide-align-1.1.3.tgz"},"maintainers":[{"name":"iarna","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wide-align_1.1.3_1527197810643_0.006292446790612027"},"_hasShrinkwrap":false,"publish_time":1527197810718,"_cnpm_publish_time":1527197810718},"1.1.2":{"name":"wide-align","version":"1.1.2","description":"A wide-character aware text alignment function for use on the console or with fixed width fonts.","main":"align.js","scripts":{"test":"tap --coverage test/*.js","version":"perl -pi -e 's/^(  \"version\": $ENV{npm_config_node_version}\").*?\",/$1abc\",/' package-lock.json ; git add package-lock.json"},"keywords":["wide","double","unicode","cjkv","pad","align"],"author":{"name":"Rebecca Turner","email":"me@re-becca.org","url":"http://re-becca.org/"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/iarna/wide-align.git"},"dependencies":{"string-width":"^1.0.2"},"devDependencies":{"tap":"^10.3.2"},"files":["align.js"],"gitHead":"f904295d03f73ddce10c2c1b0808513ebb5525c6","bugs":{"url":"https://github.com/iarna/wide-align/issues"},"homepage":"https://github.com/iarna/wide-align#readme","_id":"wide-align@1.1.2","_npmVersion":"4.6.1","_nodeVersion":"7.7.4","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"571e0f1b0604636ebc0dfc21b0339bbe31341710","size":2069,"noattachment":false,"key":"/wide-align/-/wide-align-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/wide-align/download/wide-align-1.1.2.tgz"},"maintainers":[{"name":"iarna","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/wide-align-1.1.2.tgz_1494527486997_0.9166653461288661"},"directories":{},"publish_time":1494527489686,"_cnpm_publish_time":1494527489686,"_hasShrinkwrap":false},"1.1.1":{"name":"wide-align","version":"1.1.1","description":"A wide-character aware text alignment function for use on the console or with fixed width fonts.","main":"align.js","scripts":{"test":"tap --coverage test/*.js"},"keywords":["wide","double","unicode","cjkv","pad","align"],"author":{"name":"Rebecca Turner","email":"me@re-becca.org","url":"http://re-becca.org/"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/iarna/wide-align.git"},"dependencies":{"string-width":"^2.0.0"},"devDependencies":{"tap":"^10.3.2"},"files":["align.js"],"gitHead":"9bfc4e482cf69e8abff2a2d9b19f105729a77a4b","bugs":{"url":"https://github.com/iarna/wide-align/issues"},"homepage":"https://github.com/iarna/wide-align#readme","_id":"wide-align@1.1.1","_npmVersion":"4.6.1","_nodeVersion":"4.6.1","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"d2ea8aa2db2e66467e8b60cc3e897de3bc4429e6","size":1983,"noattachment":false,"key":"/wide-align/-/wide-align-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/wide-align/download/wide-align-1.1.1.tgz"},"maintainers":[{"name":"iarna","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/wide-align-1.1.1.tgz_1494458462732_0.9675460546277463"},"directories":{},"publish_time":1494458462976,"_cnpm_publish_time":1494458462976,"_hasShrinkwrap":false},"1.1.0":{"name":"wide-align","version":"1.1.0","description":"A wide-character aware text alignment function for use on the console or with fixed width fonts.","main":"align.js","scripts":{"test":"tap --coverage test/*.js"},"keywords":["wide","double","unicode","cjkv","pad","align"],"author":{"name":"Rebecca Turner","email":"me@re-becca.org","url":"http://re-becca.org/"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/iarna/wide-align.git"},"dependencies":{"string-width":"^1.0.1"},"devDependencies":{"tap":"^2.3.2"},"gitHead":"fe3f7f210650913d5bee702d7e19938f6977bc8a","bugs":{"url":"https://github.com/iarna/wide-align/issues"},"homepage":"https://github.com/iarna/wide-align#readme","_id":"wide-align@1.1.0","_shasum":"40edde802a71fea1f070da3e62dcda2e7add96ad","_from":".","_npmVersion":"3.5.3","_nodeVersion":"4.2.2","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"40edde802a71fea1f070da3e62dcda2e7add96ad","size":2386,"noattachment":false,"key":"/wide-align/-/wide-align-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/wide-align/download/wide-align-1.1.0.tgz"},"maintainers":[{"name":"iarna","email":""}],"directories":{},"publish_time":1452290378349,"_cnpm_publish_time":1452290378349,"_hasShrinkwrap":false},"1.0.2":{"name":"wide-align","version":"1.0.2","description":"A wide-character aware text alignment function for use on the console or with fixed width fonts.","main":"align.js","scripts":{"test":"tap --coverage test/*.js"},"keywords":["wide","double","unicode","cjkv","pad","align"],"author":{"name":"Rebecca Turner","email":"me@re-becca.org","url":"http://re-becca.org/"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/iarna/wide-align.git"},"dependencies":{"string-width":"^1.0.1"},"devDependencies":{"tap":"^2.3.2"},"gitHead":"a38742ce5826d101938535d140d5d6ffb123f676","bugs":{"url":"https://github.com/iarna/wide-align/issues"},"homepage":"https://github.com/iarna/wide-align#readme","_id":"wide-align@1.0.2","_shasum":"3473d4cf2528ea002fedc8d6866bc1afad5108c6","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.2","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"3473d4cf2528ea002fedc8d6866bc1afad5108c6","size":2376,"noattachment":false,"key":"/wide-align/-/wide-align-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/wide-align/download/wide-align-1.0.2.tgz"},"maintainers":[{"name":"iarna","email":""}],"directories":{},"publish_time":1451545636373,"_cnpm_publish_time":1451545636373,"_hasShrinkwrap":false},"1.0.1":{"name":"wide-align","version":"1.0.1","description":"A wide-character aware text alignment function for use on the console or with fixed width fonts.","main":"align.js","scripts":{"test":"tap --coverage test/*.js"},"keywords":["wide","double","unicode","cjkv","pad","align"],"author":{"name":"Rebecca Turner","email":"me@re-becca.org","url":"http://re-becca.org/"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/iarna/wide-align.git"},"dependencies":{"string-width":"^1.0.1"},"devDependencies":{"tap":"^2.3.2"},"gitHead":"7f81882d88ef050f9cf728beb89a6d2347030b9f","bugs":{"url":"https://github.com/iarna/wide-align/issues"},"homepage":"https://github.com/iarna/wide-align#readme","_id":"wide-align@1.0.1","_shasum":"6cbb9c0bb42e020592877d61fc093358644998fd","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.2","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"6cbb9c0bb42e020592877d61fc093358644998fd","size":2399,"noattachment":false,"key":"/wide-align/-/wide-align-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/wide-align/download/wide-align-1.0.1.tgz"},"maintainers":[{"name":"iarna","email":""}],"directories":{},"publish_time":1450295749801,"_cnpm_publish_time":1450295749801,"_hasShrinkwrap":false},"1.0.0":{"name":"wide-align","version":"1.0.0","description":"A wide-character aware text alignment function for use on the console or with fixed width fonts.","main":"align.js","scripts":{"test":"tap --coverage test/*.js"},"keywords":["wide","double","unicode","cjkv","pad","align"],"author":{"name":"Rebecca Turner","email":"me@re-becca.org","url":"http://re-becca.org/"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/iarna/wide-align.git"},"dependencies":{"string-width":"^1.0.1"},"devDependencies":{"tap":"^2.3.2"},"gitHead":"195beaf9ffddacc074a179ddb7750382914152d5","bugs":{"url":"https://github.com/iarna/wide-align/issues"},"homepage":"https://github.com/iarna/wide-align#readme","_id":"wide-align@1.0.0","_shasum":"1f106589d579da0c79ea3d76f3ee5c399116d0b0","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.2","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"1f106589d579da0c79ea3d76f3ee5c399116d0b0","size":2282,"noattachment":false,"key":"/wide-align/-/wide-align-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/wide-align/download/wide-align-1.0.0.tgz"},"maintainers":[{"name":"iarna","email":""}],"directories":{},"publish_time":1450245483765,"_cnpm_publish_time":1450245483765,"_hasShrinkwrap":false}},"readme":"wide-align\n----------\n\nA wide-character aware text alignment function for use in terminals / on the\nconsole.\n\n### Usage\n\n```\nvar align = require('wide-align')\n\n// Note that if you view this on a unicode console, all of the slashes are\n// aligned. This is because on a console, all narrow characters are\n// an en wide and all wide characters are an em. In browsers, this isn't\n// held to and wide characters like \"古\" can be less than two narrow\n// characters even with a fixed width font.\n\nconsole.log(align.center('abc', 10))     // '   abc    '\nconsole.log(align.center('古古古', 10))  // '  古古古  '\nconsole.log(align.left('abc', 10))       // 'abc       '\nconsole.log(align.left('古古古', 10))    // '古古古    '\nconsole.log(align.right('abc', 10))      // '       abc'\nconsole.log(align.right('古古古', 10))   // '    古古古'\n```\n\n### Functions\n\n#### `align.center(str, length)` → `str`\n\nReturns *str* with spaces added to both sides such that that it is *length*\nchars long and centered in the spaces.\n\n#### `align.left(str, length)` → `str`\n\nReturns *str* with spaces to the right such that it is *length* chars long.\n\n### `align.right(str, length)` → `str`\n\nReturns *str* with spaces to the left such that it is *length* chars long.\n\n### Origins\n\nThese functions were originally taken from \n[cliui](https://npmjs.com/package/cliui). Changes include switching to the\nMUCH faster pad generation function from\n[lodash](https://npmjs.com/package/lodash), making center alignment pad\nboth sides and adding left alignment.\n","_attachments":{},"homepage":"https://github.com/iarna/wide-align#readme","bugs":{"url":"https://github.com/iarna/wide-align/issues"},"license":"ISC"}