This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
const utility = require('./utility'); | |
// region Constants. | |
const DATA_FILE_PATH = path.join(__dirname, '..', 'fund-data'); | |
const DATE_RANGES = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = (() => { | |
return { | |
debounce: function (func, wait, leading, trailing) { | |
wait = wait || 0; | |
leading = typeof leading === 'boolean' ? leading : true; | |
trailing = typeof trailing === 'boolean' ? trailing : false; | |
if (leading && trailing) { | |
throw new Error(); | |
} |