{"_id":"y-currency","_rev":"8-9838eaa60726df8352138defaf6e04ca","name":"y-currency","description":"A module that enables fast and easy currency/ies conversion using the Yahoo Finance API.","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"y-currency","version":"1.0.0","description":"A module that enables fast and easy currency/ies conversion using the Yahoo Finance API.","author":{"name":"Matas Kairaitis","email":"matas.kairaitis@gmail.com","url":"https://github.com/matys18/"},"main":"main.js","repository":{"type":"git","url":"https://github.com/matys18/y-currency"},"bugs":{"url":"https://github.com/matys18/y-currency/issues"},"keywords":["currency","conversion","converter","convert","yahoo","finance","forex"],"analyze":false,"license":"MIT","homepage":"https://github.com/matys18/y-currency","directories":{"example":"examples"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"23da77ae62b97cf02255a9d34d078066d235837c","_id":"y-currency@1.0.0","_shasum":"24f79f125ba2f281513a6d87372a5302f9d20c37","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mkairaitis","email":"matas.kairaitis@gmail.com"},"maintainers":[{"name":"mkairaitis","email":"matas.kairaitis@gmail.com"}],"dist":{"shasum":"24f79f125ba2f281513a6d87372a5302f9d20c37","tarball":"https://registry.npmjs.org/y-currency/-/y-currency-1.0.0.tgz","integrity":"sha512-k0a0YCikBAidBwXHIH0PNkqh9Cadf+KbqML+PS30+C3QFNb8+nvgTXv35VvB+pjqJCWBtYJ0rXBAta6oMTwksQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHlIaML1DemShxG1vaTSE/oKDrTHdnj6l2MG2txAGPzwIhAJ1fjg1l3da3OBSpoKPW7vwtg6Yka3ayQqOYxd63wxOw"}]}},"1.0.1":{"name":"y-currency","version":"1.0.1","description":"A module that enables fast and easy currency/ies conversion using the Yahoo Finance API.","author":{"name":"Matas Kairaitis","email":"matas.kairaitis@gmail.com","url":"https://github.com/matys18/"},"main":"main.js","repository":{"type":"git","url":"https://github.com/matys18/y-currency"},"bugs":{"url":"https://github.com/matys18/y-currency/issues"},"keywords":["currency","conversion","converter","convert","yahoo","finance","forex"],"analyze":false,"license":"MIT","homepage":"https://github.com/matys18/y-currency","directories":{"example":"examples"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"ed1a0fd03c547d02df5e2bcf24b6a4919d3c2907","_id":"y-currency@1.0.1","_shasum":"a4f5f78613abd17d8bccf3e3c77b683340adfacd","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"mkairaitis","email":"matas.kairaitis@gmail.com"},"maintainers":[{"name":"mkairaitis","email":"matas.kairaitis@gmail.com"}],"dist":{"shasum":"a4f5f78613abd17d8bccf3e3c77b683340adfacd","tarball":"https://registry.npmjs.org/y-currency/-/y-currency-1.0.1.tgz","integrity":"sha512-JnkI859ZfxF//36eDG5PDxwN+bjQXgss87drxIYocPcs09UztYC8We8DfQe/aNBLI0gBJQ41a4iK7V8OWOep/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFvz/9/U3rYHfHzt4jMPTygGhBxTOL5BjcDYl5e229SHAiBv8BbThN74otZdHBJ9vHFpnNb2fV1DxkFbAPvb3Eyemg=="}]}},"1.0.3":{"name":"y-currency","version":"1.0.3","description":"A module that enables fast and easy currency/ies conversion using the Yahoo Finance API.","author":{"name":"Matas Kairaitis","email":"matas.kairaitis@gmail.com","url":"https://github.com/matys18/"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/matys18/y-currency.git"},"bugs":{"url":"https://github.com/matys18/y-currency/issues"},"keywords":["currency","conversion","converter","convert","yahoo","finance","forex"],"analyze":false,"license":"MIT","homepage":"https://github.com/matys18/y-currency","directories":{"example":"examples"},"scripts":{"test":"mocha"},"devDependencies":{"chai":"^3.4.1","mocha":"^2.3.4"},"gitHead":"1ed3724666edffe1a224d5bd44d53e163be0c1dd","_id":"y-currency@1.0.3","_shasum":"f554793be6f6586fd134cd89fba2d829f0d81d1c","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"mkairaitis","email":"matas.kairaitis@gmail.com"},"dist":{"shasum":"f554793be6f6586fd134cd89fba2d829f0d81d1c","tarball":"https://registry.npmjs.org/y-currency/-/y-currency-1.0.3.tgz","integrity":"sha512-+mqGIyqZLkaoVOLKar+ahMkT3lagesz41ZnFXWZ7J689ZfEMQRyVchU358/dWHmU6VjtzC7+If9qgDkUJrmmiA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDtv5O50R/4UNVKSU5MJMPk7GGTT/od4bDi4EStJUnr9AiEA7gPuOAx0lu9alxn3duuhhUQ5pQPneEGhQtIM7ikS4eU="}]},"maintainers":[{"name":"mkairaitis","email":"matas.kairaitis@gmail.com"}]}},"readme":"## Instalation\n\n    npm install y-currency\n\n<a name=\"module_y-currency\"></a>\n## y-currency\nEasy currency conversion using the yahoo api.\n\n**Version**: 1.0.2  \n**Author:** Matas Kairaitis  \n**License**: MIT  \n\n* [y-currency](#module_y-currency)\n    * _static_\n        * [.convert(values, from, to, cb)](#module_y-currency.convert)\n        * [.getCurrency(symbols, cb)](#module_y-currency.getCurrency)\n    * _inner_\n        * [~convertCallback](#module_y-currency..convertCallback) : <code>function</code>\n        * [~getCurrencyCallback](#module_y-currency..getCurrencyCallback) : <code>function</code>\n\n<a name=\"module_y-currency.convert\"></a>\n### y-currency.convert(values, from, to, cb)\nConverts the provided values to another currency in one request.\n\n**Kind**: static method of <code>[y-currency](#module_y-currency)</code>  \n**Summary**: When converting multiple values you should always pass them as an array instead of\ncalling this function multiple times. This way you minimize the amount of requests that are made.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| values | <code>number</code> &#124; <code>Array.&lt;number&gt;</code> | A string or array of strings of the amounts to convert. |\n| from | <code>string</code> | The currency symbol to convert from. Will return an error if the symbol is not supported. |\n| to | <code>string</code> | The currency symbol to convert to. ill return an error if the symbol is not supported. |\n| cb | <code>convertCallback</code> | The calback that will be executed when the request is processed. |\n\n**Example**  \n```js\ncurrency.convert(10, 'USD', 'EUR', function(err, converted) {\n   if (err) // Handle error\n\n   console.log(converted); // Outputs ~8.91 (the converted value)\n});\n```\n**Example**  \n```js\ncurrency.convert([10, 20, 40], 'USD', 'EUR', function(err, converted) {\n   if (err) // Handle error\n\n   console.log(converted); // Outputs [9.11, 18.22, 27.33] (the converted values in an array)\n});\n```\n<a name=\"module_y-currency.getCurrency\"></a>\n### y-currency.getCurrency(symbols, cb)\nGets currency information as an object or array of objects in one request.\n\n**Kind**: static method of <code>[y-currency](#module_y-currency)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| symbols | <code>string</code> &#124; <code>Array.&lt;string&gt;</code> | A string or array of strings of the pairs to get information on. |\n| cb | <code>getCurrencyCallback</code> | The calback that will be executed when the request is processed. |\n\n**Example**  \n```js\ncurrency.getCurrency('USDEUR', function(err, result) {\n   if (err) // Handle error\n\n   console.log(result); // Outputs an object with currency information\n   \n   // Output\n   { id: 'USDEUR',\n     Name: 'USD to EUR',\n     Rate: '0.891',\n     Date: '2/27/2015',\n     Time: '10:56am',\n     Ask: '0.891',\n     Bid: '0.8909' }\n});\n```\n**Example**  \n```js\ncurrency.getCurrency(['USDEUR', 'NZDCAD', 'THBSEK'], function(err, result) {\n   if (err) // Handle error\n\n   console.log(result); // Outputs an object array with currency information\n   \n   // Output\n   [ { id: 'USDEUR',\n      Name: 'USD to EUR',\n      Rate: '0.8935',\n      Date: '2/27/2015',\n      Time: '12:07pm',\n      Ask: '0.8935',\n      Bid: '0.8935' },\n    { id: 'NZDCAD',\n      Name: 'NZD to CAD',\n      Rate: '0.9452',\n      Date: '2/27/2015',\n      Time: '12:07pm',\n      Ask: '0.9455',\n      Bid: '0.9449' },\n    { id: 'THBSEK',\n      Name: 'THB to SEK',\n      Rate: '0.2587',\n      Date: '2/27/2015',\n      Time: '12:07pm',\n      Ask: '0.2592',\n      Bid: '0.2581' } ]\n});\n```\n<a name=\"module_y-currency..convertCallback\"></a>\n### y-currency~convertCallback : <code>function</code>\nCallback that handles the response by convert().\n\n**Kind**: inner typedef of <code>[y-currency](#module_y-currency)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| err | <code>error</code> &#124; <code>null</code> | If an error occurs during the execution of the function it is passed here, otherwise null. |\n| values | <code>number</code> &#124; <code>Array.&lt;number&gt;</code> &#124; <code>null</code> | If no errors occured this contains the converted value/values, otherwise null. |\n\n<a name=\"module_y-currency..getCurrencyCallback\"></a>\n### y-currency~getCurrencyCallback : <code>function</code>\nCallback that handles the response by getCurrency().\n\n**Kind**: inner typedef of <code>[y-currency](#module_y-currency)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| err | <code>error</code> &#124; <code>null</code> | If an error occurs during the execution of the function it is passed here, otherwise null. |\n| values | <code>Object</code> &#124; <code>Array.&lt;Object&gt;</code> &#124; <code>null</code> | If no errors occured this contains the object or object array containing the currency information, otherwise null. |\n\n","maintainers":[{"name":"mkairaitis","email":"matas.kairaitis@gmail.com"}],"time":{"modified":"2022-06-29T06:27:29.740Z","created":"2015-02-27T17:56:23.807Z","1.0.0":"2015-02-27T17:56:23.807Z","1.0.1":"2015-03-03T11:41:39.306Z","1.0.3":"2016-01-03T22:25:45.847Z"},"homepage":"https://github.com/matys18/y-currency","keywords":["currency","conversion","converter","convert","yahoo","finance","forex"],"repository":{"type":"git","url":"git+https://github.com/matys18/y-currency.git"},"author":{"name":"Matas Kairaitis","email":"matas.kairaitis@gmail.com","url":"https://github.com/matys18/"},"bugs":{"url":"https://github.com/matys18/y-currency/issues"},"license":"MIT","readmeFilename":"README.md","users":{"kurozero":true}}