npm

Need private packages and team management tools?Check out npm Orgs. »

formatla

1.0.2 • Public • Published

formatla

string formatter

how to install

npm

npm install formatla --save

how to use

node

var formatla = require('formatla');

variables and values

formatla(string, separator, range, startDirection);
separator -> type string -> "any separator/character"
range (separator added to string at every n(range) characters) -> type number or string
startDirection (determines the direction of the start.) -> type string -> "left", "right"

examples

formatla("1000000000", ".", 3, "right"); //1.000.000.000
formatla("1000000000", ".", 3, "left"); //100.000.000.0
formatla("4543123423455678", "-", 4, "left"); //4543-1234-2345-5678
formatla("istanbulturkey", ":", 2, "right"); //is:ta:nb:ul:tu:rk:ey
 

install

npm i formatla

Downloadsweekly downloads

1

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability