New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

usd

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

usd

AMD/CommonJS Stampit factory for creating models to handle USD logic

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

USD

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

Docs

Methods

.pennies() -> Number

Returns the value in pennies

.pennies( val ) -> this

Sets the value via pennies

.dollars() -> String

Returns the value in dollars

.dollars( val ) -> this

Sets the value via dollars

Static

.decimalAdjust( type, value, exp ) -> Number

Decimal adjustment of a number

Arguments

  • type - The type of adjustment
  • value - The value
  • exp - The exponent (the 10 logarithm of the adjustment base)

License

MIT

Keywords

usd

FAQs

Package last updated on 30 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts