You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
338 B
18 lines
338 B
9 years ago
|
var _ = require('lodash');
|
||
|
|
||
|
var provider = {
|
||
|
url: 'https://bitpay.com/api/rates/',
|
||
|
parseFn: function(raw) {
|
||
|
var rates = _.compact(_.map(raw, function(d) {
|
||
|
if (!d.code || !d.rate) return null;
|
||
|
return {
|
||
|
code: d.code,
|
||
|
value: d.rate,
|
||
|
};
|
||
|
}));
|
||
|
return rates;
|
||
|
},
|
||
|
};
|
||
|
|
||
|
module.exports = provider;
|