AMD/CommonJS Stampit factory for creating models to handle USD logic
Install
npm install usd
Usage
var usd = require('usd');
var $price = usd().pennies(150);
console.log( $price.dollars() ); // => 1.50
Returns the value in pennies
Sets the value via pennies
Returns the value in dollars
Sets the value via dollars
Decimal adjustment of a number
Arguments
type
- The type of adjustmentvalue
- The valueexp
- The exponent (the 10 logarithm of the adjustment base)
MIT