string-just

0.0.2 • Public • Published

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     '

Readme

Keywords

Package Sidebar

Install

npm i string-just

Weekly Downloads

122

Version

0.0.2

License

MIT

Last publish

Collaborators

  • misumi_rize