Created
March 22, 2019 09:58
-
-
Save meza/526719500cc4139a46b7e809dd0c2cbe to your computer and use it in GitHub Desktop.
Test setup for random seed
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 Chance = require("chance") | |
module.exports = function () { | |
const chance = new Chance() | |
if (!process.env.CHANCE_SEED) { | |
process.env.CHANCE_SEED = chance.hash() | |
} | |
console.log(`Using Chance Seed: ${process.env.CHANCE_SEED}`) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment