{"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","tarball":"http://registry-npm.ywwl.com/wide-align/download/wide-align-1.0.2.tgz","integrity":"sha512-jPtcXc1kqTPwML5mBRBzBYEMQw9jVTNUICnwPtCeMoEcQwBOC+j6qqnVKxS6tJZU+k5JHBSshG3wk6aiCZESag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDxAaeD8UXxgJaRFQsh4J0Xqvt9mqeeTug3kTeSLXNaAiALE81hoxfVtjG5z998uzdnHChaYUiMwYrIkbSnu+quDg=="}],"size":2376,"noattachment":false,"key":"/wide-align/-/wide-align-1.0.2.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":1451545636373,"_cnpm_publish_time":1451545636373,"dist-tags":{"latest":"1.1.5"}}