Right align the keys of an object.
Install with npm
$ npm i right-align-keys --save
align({
a: 'x',
bbb: 'x',
ccccc: 'x',
ddddddd: 'x'
});
Results in:
{
' a': 'x',
' bbb': 'x',
' ccccc': 'x',
'ddddddd': 'x'
}
- longest: Get the longest item in an array.
- longest-value: Get the longest value for the given property from an array of objects, or the… more
- pad-left: Left pad a string with zeros or a specified string. Fastest implementation.
- pad-right: Right pad a string with zeros or a specified string. Fastest implementation.
- repeat-element: Create an array by repeating the given value n times.
- repeat-string: Repeat the given string n times. Fastest implementation for repeating a string.
- right-align-values: Right align the values of a given property for each object in an array. Useful… more
- right-pad-keys: Right pad the keys of an object.
- right-pad-values: Right pad the values of a given property for each object in an array. Useful… more
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on August 15, 2015.