investors-exchange.api
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -1,1 +0,1 @@ | ||
'use strict';var _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_lib=require('../lib');Object.defineProperty(exports,'__esModule',{value:!0});function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _asyncToGenerator(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f),h=g.value}catch(a){return void c(a)}return g.done?void a(h):Promise.resolve(h).then(function(a){d('next',a)},function(a){d('throw',a)})}return d('next')})}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}var stock=function a(){_classCallCheck(this,a),_initialiseProps.call(this);for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=c[0],f=void 0===e?'market':e;return this.symbol=f.toUpperCase(),this},_initialiseProps=function(){var a=this;this.book=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('book','/book');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.chart=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(){for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('chart','/chart/'+(d?d.join('/'):'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.company=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('company','/company');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.delayed_quote=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.quote({delayed:!0,percent:c});case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.dividends=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('dividends','/dividends/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.earnings=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('earnings','/earnings');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.financials=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('financials','/financials');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.handle=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c,d,e){var f,g,h;return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return f=a.path,g=a.symbol,b.next=3,(0,_lib.fetch)(c,f(d),e);case 3:if(h=b.sent,console.log(c,d,h),!(0,_lib.notAnObject)(h)){b.next=7;break}return b.abrupt('return',_defineProperty({symbol:g},c,h));case 7:return b.abrupt('return',_extends({symbol:g},h));case 8:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.historical=this.chart,this.largest_trades=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('largest_trades','/largest-trades');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.logo=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('logo','/logo');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.news=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('news','/news/last/'+(c||1));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.ohlc=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.t0=_extends,b.t1={symbol:a.symbol},b.next=4,a.handle('ohlc','/ohlc');case 4:return b.t2=b.sent,b.abrupt('return',(0,b.t0)(b.t1,b.t2));case 6:case'end':return b.stop();}},b,a)})),this.openclose=this.ohlc,this.path=function(b){return'/stock/'+a.symbol+b},this.peers=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('peers','/peers');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.price=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('price','/price');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.previous=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('previous','/previous');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.quote=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(){var c,d,e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},f=e.delayed,g=e.percent;return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=a.handle,d=g&&{displayPercent:!0},!f){b.next=8;break}return b.next=5,c('delayed_quote','/delayed-quote',d);case 5:return b.abrupt('return',b.sent);case 8:return b.next=10,a.handle('quote','/quote',d);case 10:return b.abrupt('return',b.sent);case 11:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.relevant=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('relevant','/relevant');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.short_interest=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('short_interest','/short-interest/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.splits=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('splits','/splits/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.spread=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('spread','/effective-spread');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.stats=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('stats','/stats');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.threshold_securities=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('threshold_securities','/threshold-securities/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.time_series=this.chart,this.volume_by_venue=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('volume_by_venue','/volume-by-venue');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}))};exports.default=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return new(Function.prototype.bind.apply(stock,[null].concat(b)))}; | ||
'use strict';var _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},_lib=require('../lib');Object.defineProperty(exports,'__esModule',{value:!0});function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _asyncToGenerator(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f),h=g.value}catch(a){return void c(a)}return g.done?void a(h):Promise.resolve(h).then(function(a){d('next',a)},function(a){d('throw',a)})}return d('next')})}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}var stock=function a(){_classCallCheck(this,a),_initialiseProps.call(this);for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=c[0],f=void 0===e?'market':e;return this.symbol=f.toUpperCase(),this},_initialiseProps=function(){var a=this;this.book=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('book','/book');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.chart=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(){for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('chart','/chart/'+(d?d.join('/'):'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.company=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('company','/company');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.delayed_quote=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.quote({delayed:!0,percent:c});case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.dividends=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('dividends','/dividends/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.earnings=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('earnings','/earnings');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.financials=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('financials','/financials');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.handle=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c,d,e){var f,g,h;return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return f=a.path,g=a.symbol,b.next=3,(0,_lib.fetch)(c,f(d),e);case 3:if(h=b.sent,console.log(c,d,'undefined'==typeof h?'undefined':_typeof(h)),!(0,_lib.notAnObject)(h)){b.next=7;break}return b.abrupt('return',_defineProperty({symbol:g},c,h));case 7:return b.abrupt('return',_extends({symbol:g},h));case 8:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.historical=this.chart,this.largest_trades=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('largest_trades','/largest-trades');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.logo=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('logo','/logo');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.news=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('news','/news/last/'+(c||1));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.ohlc=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.t0=_extends,b.t1={symbol:a.symbol},b.next=4,a.handle('ohlc','/ohlc');case 4:return b.t2=b.sent,b.abrupt('return',(0,b.t0)(b.t1,b.t2));case 6:case'end':return b.stop();}},b,a)})),this.openclose=this.ohlc,this.path=function(b){return'/stock/'+a.symbol+b},this.peers=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('peers','/peers');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.price=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('price','/price');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.previous=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('previous','/previous');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.quote=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(){var c,d,e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},f=e.delayed,g=e.percent;return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=a.handle,d=g&&{displayPercent:!0},!f){b.next=8;break}return b.next=5,c('delayed_quote','/delayed-quote',d);case 5:return b.abrupt('return',b.sent);case 8:return b.next=10,a.handle('quote','/quote',d);case 10:return b.abrupt('return',b.sent);case 11:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.relevant=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('relevant','/relevant');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.short_interest=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('short_interest','/short-interest/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.splits=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('splits','/splits/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.spread=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('spread','/effective-spread');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.stats=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('stats','/stats');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.threshold_securities=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('threshold_securities','/threshold-securities/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.time_series=this.chart,this.volume_by_venue=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('volume_by_venue','/volume-by-venue');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}))};exports.default=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return new(Function.prototype.bind.apply(stock,[null].concat(b)))}; |
{ | ||
"name": "investors-exchange.api", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Unofficial Browser / NodeJS API for https://iextrading.com", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"build": "yarn run clean && yarn run bundle", | ||
"bundle": "BABEL_ENV=production babel source --out-dir distribution", | ||
"bundle": "BABEL_ENV=production babel source --out-dir distribution --ignore **/*.test.js", | ||
"clean": "yarn run remove:distribution && yarn run create:distribution", | ||
@@ -13,0 +13,0 @@ "create:distribution": "mkdir distribution", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2
15493
6
3