Created
October 14, 2017 05:39
-
-
Save banyudu/533afdb46a0905d44f0fc3a610ae6d53 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import Chance = require('chance') | |
interface IChance extends Chance.Chance { | |
password(): string | |
} | |
export const chance = new Chance() as IChance | |
// mixins | |
chance.mixin({ | |
password: () => { | |
const length = chance.integer({min: 6, max: 30}) | |
return chance.string({length}) | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment