Skip to content

Instantly share code, notes, and snippets.

@alersenkevich
Last active September 26, 2018 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alersenkevich/0a0511731f0cbb1e1231a89e858207e4 to your computer and use it in GitHub Desktop.
Save alersenkevich/0a0511731f0cbb1e1231a89e858207e4 to your computer and use it in GitHub Desktop.
parsing
const nominals = ['BTC', 'ETH', 'USD'];
const timeIntervals = ['1m', '5m', '15m', '1h', '4h', '1d'];
const loadingResult = await Promise.all(nominals.map(
(nominal, nominalKey) => Promise.all(timeIntervals.map(
(interval, intervalKey) => models[`Price${interval + nominal}`]
.bulkCreate(comparedSplittedPrices[nominalKey][intervalKey]),
)),
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment