Skip to content

Commit

Permalink
fix(index): revert back to non-class re-export approach
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Jan 29, 2021
1 parent 58915e7 commit 3954244
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
6 changes: 2 additions & 4 deletions bin/yahoo-finance.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env node

const YahooFinance = require('../api/index.js').default;
const { modules } = require('../api/index.js');
const moduleNames = Object.keys(modules);
const yahooFinance = require('../api/index.js');
const moduleNames = Object.keys(yahooFinance);

const node = process.argv[0];
const script = process.argv[1];
Expand Down Expand Up @@ -31,7 +30,6 @@ function decodeArgs(stringArgs) {
(async function() {
const args = decodeArgs(argsAsStrings);

const yahooFinance = new YahooFinance();
const result = await yahooFinance[moduleName](...args);

if (process.stdout.isTTY)
Expand Down
15 changes: 1 addition & 14 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,9 @@ import historical from './modules/historical';
import quoteSummary from './modules/quoteSummary';
import search from './modules/search';

export const modules = {
export {
autoc,
historical,
quoteSummary,
search,
};


class YahooFinance {
constructor() {
}

autoc = autoc;
historical = historical;
quoteSummary = quoteSummary;
search = search;
}

export default YahooFinance;

0 comments on commit 3954244

Please sign in to comment.