{"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","tarball":"http://registry-npm.ywwl.com/wide-align/download/wide-align-1.0.1.tgz","integrity":"sha512-JOrhnKZmiwTmkNoEwtam/YjMYAdrBtC/xMOiRbborrKjyzYZgXJOvf9N0r9RWmabL1Dy4D+HVQCCphJMaK/pfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDD9OwoK4oHO+SY89TJrb0Pjk/6ScqELyfel1sQtVWoHAiEAzdOfr5ahL3aEL6WFzWdrbI5I7WR+nOndoENBiTr3V8c="}],"size":2399,"noattachment":false,"key":"/wide-align/-/wide-align-1.0.1.tgz"},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"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":1450295749801,"_cnpm_publish_time":1450295749801,"dist-tags":{"latest":"1.1.5"}}