Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

format-quantity

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

format-quantity - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

bower.json
{
"name": "format-quantity",
"main": "index.js",
"version": "0.3.0",
"version": "0.3.1",
"homepage": "https://github.com/jakeboone02/format-quantity",

@@ -6,0 +6,0 @@ "authors": [

{
"name": "format-quantity",
"version": "0.3.0",
"version": "0.3.1",
"description": "Format a number as an integer plus fraction, as seen in recipe ingredient lists",

@@ -5,0 +5,0 @@ "repository": {

# format-quantity
### Installation:
### Installation
##### npm
https://www.npmjs.com/package/format-quantity
```

@@ -9,9 +13,20 @@ npm i --save format-quantity

### Usage:
##### Browser
In the browser, available as a global function `formatQuantity`.
```
var formatQuantity = require("format-quantity");
<script src="bower_components/format-quantity/index.js"></script>
<script>
console.log(formatQuantity(10.5)); // "10 1/2"
</script>
```
### Usage
```
var formatQuantity = require("format-quantity"); // assuming node environment
console.log( formatQuantity(1.5) ); // "1 1/2"
console.log( formatQuantity(2.66) ); // "2 2/3"
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc