Skip to content

elekktrisch/stutzjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

StutzJS

Demo

Getting started

Import the stutz script by adding a script tag in the html header:

<script src="./stutz.standalone.js"></script>

Or by adding an npm dependency

npm install stutzjs --save

Format values

var stutz = money.of("CHF", "1234654987.123");
var formattedMoney = stutz.formatMoney(); // "CHF 1'234'654'987.12"

Parse formatted values

var stutz = money.parse("CHF 1'234'654'987.12");
console.log(stutz.getAmount().toFixed(3)); // "1234654987.120" 
console.log(stutz.getCurrencyCode()); // "CHF" 

see Demo for all configuration options.

About

StutzJS formats money amounts with currency code and bigdecimal value

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors