random-char
Advanced tools
Comparing version 1.0.0 to 1.0.1
17
index.js
@@ -5,11 +5,14 @@ 'use strict'; | ||
var pools = { | ||
lower: 'abcdefghijklmnopqrstuvwxyz', | ||
upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', | ||
number: '0123456789', | ||
symbol: '!@#$%^&*()[]' | ||
}; | ||
pools.alpha = pools.lower + pools.upper; | ||
pools['undefined'] = pools.lower + pools.upper + pools.number + pools.symbol; | ||
module.exports = function (pool) { | ||
var pools = { | ||
lower: 'abcdefghijklmnopqrstuvwxyz', | ||
upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', | ||
number: '0123456789', | ||
symbol: '!@#$%^&*()[]' | ||
}; | ||
pool = pool || 'lower'; | ||
@@ -16,0 +19,0 @@ pool = pools[pool] || pool; |
{ | ||
"name": "random-char", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Generate a random character.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -47,2 +47,4 @@ # random-char | ||
- `'symbol'` - `'!@#$%^&*()[]'` | ||
- `'alpha'` - `'lower'` + `'upper'` | ||
- `'undefined'` - `'lower'` + `'upper'` + `number` + `'symbol'` | ||
@@ -49,0 +51,0 @@ Custom pool: `randomChar('something');` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5972
15
83