Modules@robinpath/money
@robinpath/money
0.1.1PublicCurrency formatting, safe arithmetic, conversion, tax, discount, and exchange rates
@robinpath/money
Currency formatting, safe arithmetic, conversion, tax, discount, and exchange rates
Why use this module?
The money module lets you:
- Format number as currency
- Parse currency string to number
- Safe addition
- Safe subtraction
- Safe multiplication
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/money
Quick Start
No credentials needed — start using it right away:
money.parse "$1,234.56"
Available Functions
| Function | Description |
|---|---|
money.format | Format number as currency |
money.parse | Parse currency string to number |
money.add | Safe addition |
money.subtract | Safe subtraction |
money.multiply | Safe multiplication |
money.divide | Safe division |
money.round | Round to currency precision |
money.convert | Convert between currencies |
money.fetchRate | Fetch live exchange rate |
money.split | Split amount evenly |
money.percentage | Calculate percentage |
money.discount | Apply discount |
money.tax | Add tax |
money.currencyInfo | Get currency info |
money.listCurrencies | List all currency codes |
money.isValidCode | Check if currency code is valid |
Examples
Parse currency string to number
money.parse "$1,234.56"
Safe addition
money.add 0.1 0.2
Safe subtraction
money.subtract 10.50 3.25
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/money";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
money.parse "$1,234.56"
`);
Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/json— JSON module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.1 | latest | yesterday |
Related Modules
utilities
1
@dev-tester/hello-world
v2.0.0dev-tester
Updated description
0 downloads
...
utilities
0
@robinpath/apollo
v0.1.1robinpath
Apollo module for RobinPath.
0 downloads
...
utilities
0
@robinpath/archive
v0.1.1robinpath
Create and extract .zip and .tar.gz file archives
0 downloads
...
utilities
0
@robinpath/assert
v0.1.1robinpath
Testing assertions: equal, deepEqual, truthy, falsy, type checks, includes, matches, throws, and more
0 downloads
...
Install
$ robinpath install @robinpath/money Version0.1.1
LicenseMIT
Unpacked Size6.0 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

