{"_id":"bigmoney.js","_rev":"10-ad044e5e6bbf8164e61458d05fec2b0f","name":"bigmoney.js","description":"Library for handling the money values. Based on big.js library for arbitrary-precision decimal arithmetic. Support multiple currencies.","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"bigmoney.js","version":"0.0.1","description":"Library for handling the money values. Based on big.js library for arbitrary-precision decimal arithmetic. Support multiple currencies.","main":"bigmoney.js","directories":{"example":"examples"},"dependencies":{"big.js":"~2.5.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/demchenkoe/bigmoney.js"},"keywords":["money","currency","calc","js","javascipt","float","math"],"author":{"name":"Eugene Demchenko","url":"it-bm@mail.ru"},"license":"BSD","_id":"bigmoney.js@0.0.1","dist":{"shasum":"1c616927b84477a2eb92e7da8b11280cc0a6b5d7","tarball":"https://registry.npmjs.org/bigmoney.js/-/bigmoney.js-0.0.1.tgz","integrity":"sha512-/ngwqVIj83ZTSRHGIp/x4615Gvxua3y5F9SlQ0op0YlWpNrlmoh1yu01cy5wjTe7p8EFpZqYU6i3BsEZ1gtRxQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBerIe/wOdlm0lDLH/7b9TieZIjT9ykTw9moR5E88mgFAiEA5q4/gcY4Vi0txtmtqFmlEqUfW0tFaPjwQGGsEd6ib1I="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"goldix","email":"demchenkoev@gmail.com"},"maintainers":[{"name":"goldix","email":"demchenkoev@gmail.com"}]},"0.0.1-a":{"name":"bigmoney.js","version":"0.0.1-a","description":"Library for handling the money values. Based on big.js library for arbitrary-precision decimal arithmetic. Support multiple currencies.","main":"bigmoney.js","directories":{"example":"examples"},"dependencies":{"big.js":"~2.5.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/demchenkoe/bigmoney.js"},"keywords":["money","currency","calc","js","javascipt","float","math"],"author":{"name":"Eugene Demchenko","url":"it-bm@mail.ru"},"license":"BSD","_id":"bigmoney.js@0.0.1-a","dist":{"shasum":"58a36ccb093264d248dea7ab87659a6bc1ef02f2","tarball":"https://registry.npmjs.org/bigmoney.js/-/bigmoney.js-0.0.1-a.tgz","integrity":"sha512-4YUSIRXL/7AYVkL/uHT4GMLwWDW+ZF9SAHRGhZ+7zuAdU3Y1TTLC2u9b4WnP8Qn4vjF044KW08ld7ytKjRt37g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4tpjNZvztK8XfdOAJH3GgdIB1aTOCzvLdYnB2uviE2QIhAOoPBM4mO6fL6SHJj7fp2AxAsn2BKdaoVs7aTr7KdREj"}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"goldix","email":"demchenkoev@gmail.com"},"maintainers":[{"name":"goldix","email":"demchenkoev@gmail.com"}]},"0.0.3":{"name":"bigmoney.js","version":"0.0.3","description":"Library for handling the money values. Based on big.js library for arbitrary-precision decimal arithmetic. Support multiple currencies.","main":"bigmoney.js","directories":{"example":"examples"},"dependencies":{"big.js":"~2.5.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/demchenkoe/bigmoney.js.git"},"contributors":[{"name":"Renato Gama","email":"renato@gammasoft.com.br","url":"http://github.com/renatoargh"}],"keywords":["money","currency","calc","js","javascipt","float","math"],"author":{"name":"Eugene Demchenko","url":"it-bm@mail.ru"},"license":"BSD","gitHead":"e58543f71cdc170b1e58c41a776a044d05662648","bugs":{"url":"https://github.com/demchenkoe/bigmoney.js/issues"},"homepage":"https://github.com/demchenkoe/bigmoney.js#readme","_id":"bigmoney.js@0.0.3","_shasum":"f7904e5a1a9a20d1d4cf25a658f35d05cd7065d4","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.0","_npmUser":{"name":"goldix","email":"it-bm@mail.ru"},"dist":{"shasum":"f7904e5a1a9a20d1d4cf25a658f35d05cd7065d4","tarball":"https://registry.npmjs.org/bigmoney.js/-/bigmoney.js-0.0.3.tgz","integrity":"sha512-5VV/HbQL7m3s7+wD0eA/TK+ggtAAjDr8H5R/tpgBApZQq03l9q2uYwurfj+7XBiHDAesfqfUzmx5x5f95xLk1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZoJKqUffZC8ONp1HEQJug85Dm4y6HMeDdvmF6eh74kAiEA5TBPAAAQBF91VA2i4x4mFqgvZNhqJwlzOGC/WaD0jcs="}]},"maintainers":[{"name":"goldix","email":"demchenkoev@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bigmoney.js-0.0.3.tgz_1459238959897_0.41003584139980376"}},"0.0.4":{"name":"bigmoney.js","version":"0.0.4","description":"Library for handling the money values. Based on big.js library for arbitrary-precision decimal arithmetic. Support multiple currencies.","main":"bigmoney.js","directories":{"example":"examples"},"dependencies":{"big.js":"~2.5.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/demchenkoe/bigmoney.js.git"},"contributors":[{"name":"Renato Gama","email":"renato@gammasoft.com.br","url":"http://github.com/renatoargh"}],"keywords":["money","currency","calc","js","javascipt","float","math"],"author":{"name":"Eugene Demchenko","url":"it-bm@mail.ru"},"license":"BSD","gitHead":"94f42728883e4ba890c49759b465e1b01ab974d0","bugs":{"url":"https://github.com/demchenkoe/bigmoney.js/issues"},"homepage":"https://github.com/demchenkoe/bigmoney.js#readme","_id":"bigmoney.js@0.0.4","_shasum":"1420e1de43f411b1512b6bfe7c0c304645ce401f","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.0","_npmUser":{"name":"goldix","email":"it-bm@mail.ru"},"dist":{"shasum":"1420e1de43f411b1512b6bfe7c0c304645ce401f","tarball":"https://registry.npmjs.org/bigmoney.js/-/bigmoney.js-0.0.4.tgz","integrity":"sha512-TvGS2N8lYLfImC+BnuHIbvEgXxVSobPW8onxK1v1Rw18TMrlnb7sCMd4uQToe2onYNT7WdFyTI9dlrWulMJDdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHqp/hFJqqE3ORfo+wqQS+rmJqVmbEi81pq+DUdUba3VAiEAlaLwjaAzfktBrsj7up3BciFQ8y/RxDYZpcC6LTrKC9s="}]},"maintainers":[{"name":"goldix","email":"demchenkoev@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/bigmoney.js-0.0.4.tgz_1459239989348_0.21527299261651933"}}},"readme":"# bigmoney.js #\nLibrary for handling the money values.\nSupport multiple currencies.\nBased on big.js library for arbitrary-precision decimal arithmetic.\n\n## Load\n\nThe library is the single JavaScript file *bigmoney.js* (or *bigmoney-all.min.js*, which is *bigmoney.js* with all dependencies and minified).\n\nIt can be loaded via a script tag in an HTML document for the browser\n\n    <script src='./relative/path/to/bigmoney-all.min.js'></script>\n\nor as a CommonJS, [Node.js](http://nodejs.org) or AMD module using `require`.\n\nFor Node, put it in a *node_modules* directory within the directory and use `require('bigmoney')`.\n\nTo load with AMD loader libraries such as [requireJS](http://requirejs.org/):\n\n    require(['bigmoney'], function(BigMoney) {\n        // Use BigMoney here in local scope. No global Big.\n    });\n\n\n## Use\n\nSetup settings\n\n    Money.settings = {\n        base: \"USD\",\n        rates: {\n            USD : 1, //this is base. Other rates relative to the base.\n            RUB: 35.2448,\n            EUR: 1/1.3485,\n            JPY: 102.02\n        },\n        format: \"%decimal %currency\"\n    }\n\n\nConstructor\n\n    var eur  = Money(100, 'EUR');\n    var usd  = Money(100, 'EUR').convert('USD');\n    var usd2 = Money(250);   //equal Money(250, Money.settings.base);\n\n    //get numeric value\n\n    usd.valueOf();             //134.85\n\n    //get string value\n\n    usd.toString();            //\"134.85\"\n\n    //get formatted string\n\n    usd.format();             //\"134.85 USD\"\n    usd.format(\"$ %decimal\"); //\"$ 134.85\"\n\nConvert currency\n\n    var usd = eur.convert('USD');\n    //or\n    var usd = Money(100, 'EUR').convert('USD')\n    //or\n    console.log( Money(100, 'EUR').convert('USD').format() )  //\"134.85 USD\"\n\nSetup custom formatter\n\n    Money.formatter = function(decimal, currency, formatParam) {\n        switch(currency) {\n            case 'USD': return \"$\" + decimal;\n            case 'EUR': return \"€\" + decimal;\n            case 'JPY': return \"¥\" + decimal;\n            default: return decimal + \" \" + currency;\n        }\n    }\n\n    Money(100, 'EUR').format();                //\"€100\"\n    Money(100, 'EUR').convert(\"JPY\").format(); //\"¥13757.4\"\n    Money(100, 'EUR').convert(\"RUB\").format(); //\"4752.76 RUB\"\n\n\nArbitrary-precision decimal arithmetic provided by big.js library\n\n    usd.valueOf();             //134.85\n    usd.plus(100).valueOf();   //234.85\n    usd.minus(100).valueOf();  //34.85\n    usd.times(2).valueOf();    //269.7\n    usd.div(2).valueOf();      //67.43\n    usd.mod(1).valueOf();      //0.85\n\n## Build\n\nFor Node, if uglify-js is installed globally ( `npm install uglify-js -g` ) then\n\n\tcat node_modules/big.js/big.js bigmoney.js | uglifyjs -o bigmoney-all.min.js\n\n\n## Author\n\nEugene Demchenko it-bm@mail.ru skype: demchenkoe\n\n## Licence\n\nSee LICENCE.\n\n## Thanks\n\nBig thanks for Michael Mclaughlin (author of big.js library).","maintainers":[{"email":"demchenkoev@gmail.com","name":"goldix.org"}],"time":{"modified":"2022-06-13T04:36:28.984Z","created":"2014-02-01T12:31:47.153Z","0.0.1":"2014-02-01T12:33:37.030Z","0.0.1-a":"2014-02-01T13:17:03.652Z","0.0.3":"2016-03-29T08:09:23.398Z","0.0.4":"2016-03-29T08:26:30.312Z"},"readmeFilename":"README.md","author":{"name":"Eugene Demchenko","url":"it-bm@mail.ru"},"repository":{"type":"git","url":"git+https://github.com/demchenkoe/bigmoney.js.git"},"homepage":"https://github.com/demchenkoe/bigmoney.js#readme","keywords":["money","currency","calc","js","javascipt","float","math"],"contributors":[{"name":"Renato Gama","email":"renato@gammasoft.com.br","url":"http://github.com/renatoargh"}],"bugs":{"url":"https://github.com/demchenkoe/bigmoney.js/issues"},"license":"BSD"}