node-oanda
Version:
A NodeJS wrapper for the Oanda REST API
16 lines (12 loc) • 312 B
JavaScript
var utility = {
define: function(obj, alt) {
return typeof obj === 'undefined' ? alt : obj;
},
encodeArray: function(a) {
for(var out = '', i = 0; i < a.length; i++) {
out += a[i] + (i == a.length - 1 ? '' : ',');
}
return encodeURIComponent(out);
}
};
module.exports = utility;