format-quantity

JSON →
library 3.1.0 ·javascript
verified Jun 4, 2026

Format numbers as imperial measurement strings with vulgar fractions, mixed numbers, and Roman numerals. Current stable version is 3.1.0, released on npm with a Node.js >=16 requirement. It ships TypeScript types and is actively maintained. Key differentiators: supports vulgar fraction characters (e.g., '⅞'), mixed number parsing via numeric-quantity, and options like fractionSlash (using Unicode fraction slash) and custom separator. Intended for recipe ingredient formatting where empty string is returned for zero. Alternative to manual fraction conversion; inverse operation available in numeric-quantity package.