Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://sarahdayan.github.io/dinero.js/
Create, calculate, and format money in JavaScript and TypeScript.
https://sarahdayan.github.io/dinero.js/
amount currency immutable javascript monetary money typescript
Last synced: about 2 months ago
JSON representation
Create, calculate, and format money in JavaScript and TypeScript.
- Host: GitHub
- URL: https://sarahdayan.github.io/dinero.js/
- Owner: dinerojs
- License: mit
- Created: 2018-03-10T23:56:04.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-05-23T03:29:46.000Z (4 months ago)
- Last Synced: 2024-05-23T04:50:28.297Z (4 months ago)
- Topics: amount, currency, immutable, javascript, monetary, money, typescript
- Language: TypeScript
- Homepage: https://v2.dinerojs.com/docs
- Size: 6.44 MB
- Stars: 6,207
- Watchers: 29
- Forks: 187
- Open Issues: 35
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-fe-resources - Dinero.js - is a library for working with monetary values in JavaScript. (Table of Contents / JavaScript)
README
Dinero.js lets you create, calculate, and format money safely in JavaScript and TypeScript.
v2.dinerojs.com/docs---
Money is complex, and the primitives of the language aren't enough to properly represent it. Dinero.js is a JavaScript library that lets you express monetary values, but also perform mutations, conversions, comparisons, formatting, and overall make money manipulation easier and safer in your application.
> βΉοΈ Dinero.js v2 is currently in alpha. For v1, check the [`v1` branch](https://github.com/dinerojs/dinero.js/tree/v1) and [docs](https://v1.dinerojs.com/).
## π¦ Install
```sh
npm install dinero.js@alpha# or
yarn add dinero.js@alpha
```## β‘οΈ Quick start
`Dinero` objects are minimal. Every function in `dinero.js` is side-effect free, allowing you only to bundle exactly what you use.
```js
import { USD } from '@dinero.js/currencies';
import { dinero, add } from 'dinero.js';const d1 = dinero({ amount: 500, currency: USD });
const d2 = dinero({ amount: 800, currency: USD });add(d1, d2);
```Check out the [quick start guide](https://v2.dinerojs.com/docs/getting-started/quick-start) on the documentation.
## π Documentation
The documentation lets you learn about all aspects of the library.
- [**Getting started**](https://v2.dinerojs.com/docs/getting-started/quick-start) to get up and running quickly with Dinero.js
- [**Core concepts**](https://v2.dinerojs.com/docs/core-concepts/amount) to learn about the underlying principles behind the library
- [**Guides**](https://v2.dinerojs.com/docs/guides/using-different-amount-types) to dig deeper into specific use cases.
- [**API**](https://v2.dinerojs.com/docs/api/mutations/add) for a comprehensive list of available functions and their parameters.
- [**FAQ**](https://v2.dinerojs.com/docs/faq/does-dinerojs-support-cryptocurrencies) for common answers to questions you might haveVisit the [full documentation](https://v2.dinerojs.com/docs) to know more.
## π₯ Contributors
[![Dinero.js contributors](https://contrib.rocks/image?repo=dinerojs/dinero.js)](https://github.com/dinerojs/dinero.js/graphs/contributors)
**From v1**
Sarah Dayan
Yacine Hmito
Scott Trinh
Rolandas Barysas
Luiz "Bills"
Leonardo Dino
Roman Komarov
Juan Garcia
Freddy Robinson
Andy Burke
Andre Wiggins
David DeSandro
Max KΓΆrlinge
Ilia Ermolin
Kevin Brown
Sean Walker
John Nguyen
Sudarsan Balaji
## π License
[MIT](LICENSE)
---
[![Powered by Vercel](.github/powered-by-vercel.svg)](https://vercel.com/?utm_source=dinerojs&utm_campaign=oss)