Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 675 Bytes

setGlobalConfig.md

File metadata and controls

31 lines (23 loc) · 675 Bytes

setGlobalConfig

This util function sets global config options, merging with the defaults. These options are then the defaults used for every request. It is the recommended way of setting global config. Setting global config directly is not recommended.

Usage:

import yahooFinance from 'yahoo-finance2';

yahooFinance.setGlobalConfig({
    queue: {
        // some options here
    }
});

Notes:

  • Config provided to this function is validated.

  • Options are merged infinite levels deep:

import yahooFinance from 'yahoo-finance2';

yahooFinance.setGlobalConfig({
    queue: {
        concurrency: 2,
        // timeout is still set
    }
});