Reputation: 409
In other words can I do this :
import Binance from 'binance-api-node'
const client = Binance()
with a require() statement ??
The above code needs to be in a small module I have to write so I cannot use import
Upvotes: 1
Views: 424
Reputation: 2708
If you want to use ES modules try this:
import Binance from 'binance-api-node'
const client = Binance.default()
Upvotes: 2
Reputation: 51
const Binance = require('binance-api-node').default;
const client = Binance();
Upvotes: 2