string-just

Add Ruby ljust/rjust methods to JavaScript String

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
string-just
000.0.28 years ago8 years agoMinified + gzip package size for string-just in KB

Readme

string-just
Add Ruby ljust/rjust methods to JavaScript String

Installation

Install with npm:
$ npm install string-just

Install with component:
$ component install MisumiRize/js-string-just

Example

Basic

var just = require('just');

just.ljust('test', 10);       // => 'test      '
just.rjust('test', 10);       // => '      test'

just.ljust('test', 10, 'a');  // => 'testaaaaaa'

Polyfill

just();

'test'.ljust(10);  // => 'test     '