diff options
author | Rebecca Turner <me@re-becca.org> | 2016-06-24 13:43:51 -0700 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2016-06-27 11:46:15 +0200 |
commit | d538811fc8b920f3f36d5f21a4c23e270367ceb0 (patch) | |
tree | 11cee6c00aa843f16a71819039396f80bf6abe22 /deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md | |
parent | 1db31a34948eee311abd9881bbf5d906d0cd678b (diff) | |
download | android-node-v8-d538811fc8b920f3f36d5f21a4c23e270367ceb0.tar.gz android-node-v8-d538811fc8b920f3f36d5f21a4c23e270367ceb0.tar.bz2 android-node-v8-d538811fc8b920f3f36d5f21a4c23e270367ceb0.zip |
deps: upgrade npm to 3.10.2
Contains the following npm releases:
- https://github.com/npm/npm/releases/tag/v3.9.6
- https://github.com/npm/npm/releases/tag/v3.10.0
- https://github.com/npm/npm/releases/tag/v3.10.1
- https://github.com/npm/npm/releases/tag/v3.10.2
PR-URL: https://github.com/nodejs/node/pull/7410
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md')
-rw-r--r-- | deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md new file mode 100644 index 0000000000..4cbb017556 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md @@ -0,0 +1,47 @@ +wide-align +---------- + +A wide-character aware text alignment function for use in terminals / on the +console. + +### Usage + +``` +var align = require('wide-align') + +// Note that if you view this on a unicode console, all of the slashes are +// aligned. This is because on a console, all narrow characters are +// an en wide and all wide characters are an em. In browsers, this isn't +// held to and wide characters like "古" can be less than two narrow +// characters even with a fixed width font. + +console.log(align.center('abc', 10)) // ' abc ' +console.log(align.center('古古古', 10)) // ' 古古古 ' +console.log(align.left('abc', 10)) // 'abc ' +console.log(align.left('古古古', 10)) // '古古古 ' +console.log(align.right('abc', 10)) // ' abc' +console.log(align.right('古古古', 10)) // ' 古古古' +``` + +### Functions + +#### `align.center(str, length)` → `str` + +Returns *str* with spaces added to both sides such that that it is *length* +chars long and centered in the spaces. + +#### `align.left(str, length)` → `str` + +Returns *str* with spaces to the right such that it is *length* chars long. + +### `align.right(str, length)` → `str` + +Returns *str* with spaces to the left such that it is *length* chars long. + +### Origins + +These functions were originally taken from +[cliui](https://npmjs.com/package/cliui). Changes include switching to the +MUCH faster pad generation function from +[lodash](https://npmjs.com/package/lodash), making center alignment pad +both sides and adding left alignment. |