Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var isNumber = require('is-number');
var typeOf = require('kind-of');
var mathRandom = require('math-random');
/**
* Expose `randomatic`
*/
module.exports = randomatic;
module.exports.isCrypto = !!mathRandom.cryptographic;
/**
* Available mask characters
*/
var type = {
lower: 'abcdefghijklmnopqrstuvwxyz',
upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
number: '0123456789',
special: '~!@#$%^&()_+-={}[];\',.'
};
type.all = type.lower + type.upper + type.number + type.special;
/**
* Generate random character sequences of a specified `length`,