CryptoKraken / crypto-kraken-services

MIT License
0 stars 1 forks source link

Add a global option to disable type checking in native packages #115

Open skubarenko opened 6 years ago

skubarenko commented 6 years ago

So you can write the following way:

const kuCoin = new KuCoinRestV1({
     typeChecking: false // by default true
});

// Now this method returns data without type checking
await kuCoin.tick();

// It checks only the 'coinType' field despite the global 'typeChecking' option
await kuCoin.tick(undefined, { coinType: true }); 

kuCoin.typeChecking = true;

// And now this method returns data with type checking
await kuCoin.tick();