경량 통화 변환 라이브러리, money.js의 후속 버전
https://github.com/xxczaki/cashify
const {Cashify} = require('cashify'); const currency = require('currency.js'); const rates = { GBP: 0.92, EUR: 1.00, USD: 1.12 }; const cashify = new Cashify({base: 'EUR', rates}); const converted = cashify.convert(8635619, {from: 'EUR', to: 'GBP'}); // => 7944769.48 // Format the conversion result currency(converted, {symbol: '€', formatWithSymbol: true}).format(); // => €7,944,769.48
등록된 댓글이 없습니다.