{"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":{"integrity":"sha512-zD7wsq/y2fs6BGv0rdS/PpnGuqCoUmWdbVwitpObGByptZD4BKlAa9W6h6w2I+qsdaYoCUAvagV/IMiT2Z9kpg==","shasum":"d2ea8aa2db2e66467e8b60cc3e897de3bc4429e6","tarball":"http://registry-npm.ywwl.com/wide-align/download/wide-align-1.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCB450qRPeqEFRTdkGxdWMoL6yRUqID0KgH5Yv8xGq0DQIgeuG6QSfkF+3cS4pAhY9NOZZm2Plhll8dfRApblMx6Y4="}],"size":1983,"noattachment":false,"key":"/wide-align/-/wide-align-1.1.1.tgz"},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/wide-align-1.1.1.tgz_1494458462732_0.9675460546277463"},"directories":{},"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","publish_time":1494458462976,"_cnpm_publish_time":1494458462976,"dist-tags":{"latest":"1.1.5"}}