Skip to content

Instantly share code, notes, and snippets.

View szxmsu's full-sized avatar
🎯
Focusing

Lyon Hu 胡阳广 szxmsu

🎯
Focusing
View GitHub Profile
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 = {
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();
}