Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

random-char

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

random-char - npm Package Compare versions

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');`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc