dleitee / Walletjs
Licence: mit
đłA little library to handle money amounts.
Stars: â 177
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Walletjs
RavenCoin-Wallet-With-Miners
RavenCoin Wallet including CPU and GPU miners! programs are directly from Ravencoin and official miner sources
Stars: â 75 (-57.63%)
Mutual labels: money, wallet
Zold
An Experimental Non-Blockchain Cryptocurrency for Fast Micro Payments
Stars: â 183 (+3.39%)
Mutual labels: wallet, money
Adrestia
APIs & SDK for interacting with Cardano.
Stars: â 56 (-68.36%)
Mutual labels: wallet, library
Laravel Paystack
đł đŚ đ° Laravel 6, 7 and 8 Package for Paystack
Stars: â 398 (+124.86%)
Mutual labels: library, money
Javamoney Lib
JavaMoney financial libraries, extending and complementing JSR 354
Stars: â 104 (-41.24%)
Mutual labels: library, money
Move To Library Sketchplugin
You can now move symbol from your project to any library and re-attach all the symbol instances to this library. also it keep the overrides without any problems and it work with abstract that have libraries not in your local machine
Stars: â 174 (-1.69%)
Mutual labels: library
Confetti.js
A simple confetti animation for your website :)
Stars: â 170 (-3.95%)
Mutual labels: library
Dragview
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube New graphic component.
Stars: â 171 (-3.39%)
Mutual labels: library
Adaptive Tab Bar
AdaptiveController is a 'Progressive Reduction' Swift UI module for adding custom states to Native or Custom iOS UI elements. Swift UI component by @Ramotion
Stars: â 2,032 (+1048.02%)
Mutual labels: library
Moneyfox
A way to make budgeting easy. A basic idea for the community, made even better by the community.
Stars: â 170 (-3.95%)
Mutual labels: money
Transitioner
A library for dynamic view-to-view transitions
Stars: â 2,049 (+1057.63%)
Mutual labels: library
Expanding Collection Android
ExpandingCollection is a material design card peek/pop controller. Android UI Library made by @Ramotion
Stars: â 2,032 (+1048.02%)
Mutual labels: library
Ksprefs
đ⥠Kotlin SharedPreferences wrapper & cryptographic preferences android library.
Stars: â 176 (-0.56%)
Mutual labels: library
Crawler Commons
A set of reusable Java components that implement functionality common to any web crawler
Stars: â 173 (-2.26%)
Mutual labels: library
Dimeshift
đ°đ°đ° the easiest way to track your expenses. Free. Open-source. Node.js
Stars: â 173 (-2.26%)
Mutual labels: money
"Mo money, No problems" - walletjs
IMPORTANT: We use big.js
to handle huge numbers.
Now you can handle money without headaches!
Install
npm install --save walletjs
or
yarn add walletjs
Examples
import Wallet, { Money } from 'walletjs'
const money = Money.init(100)
const wallet = Wallet.init(money)
console.log(wallet.getAmount(money.currency))
const money2 = Money.init(100)
const newWallet = wallet.add(money2)
console.log(newWallet.getAmount(money2.currency))
convertCurrency
import Wallet, { Money } from 'walletjs'
const money = Money.init(100, { currency: 'BRL' } )
const brlWallet = Wallet.init(money)
const usdWallet = brlWallet.convertCurrency('BRL', 'USD', 3.09)
console.log(brlWallet.getAmount('BRL')) => '100.00'
console.log(brlWallet.getAmount('USD')) => '0.00'
console.log(usdWallet.getAmount('BRL')) => '0.00'
console.log(usdWallet.getAmount('USD')) => '309.00'
no problems with float errors
// on javascript
const a = 0.1
const b = 0.2
console.log(a + b) => 0.30000000000000004
// on walletjs
const money = Money.init(0.2)
money.add(0.1) => returns 0.3
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].