JSPM

formatla

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q14742F
  • License MIT

string formatter

Package Exports

  • formatla

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (formatla) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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