26 lines
417 B
JavaScript
26 lines
417 B
JavaScript
/**
|
|
*
|
|
* User: Martin Donnelly
|
|
* Date: 2016-06-23
|
|
* Time: 11:45
|
|
*
|
|
*/
|
|
const ftse = require('ftse');
|
|
|
|
module.exports = {
|
|
|
|
'getFTSE': function() {
|
|
return new Promise(function(resolve, reject) {
|
|
'use strict';
|
|
|
|
const err = 0;
|
|
ftse('100', 10, 'risers', function(items) {
|
|
if (items === err)
|
|
return reject(err);
|
|
|
|
return resolve(items);
|
|
});
|
|
});
|
|
}
|
|
};
|