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

secure-random-string

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure-random-string - npm Package Compare versions

Comparing version 1.1.0 to 1.1.2

6

package.json
{
"name": "secure-random-string",
"version": "1.1.0",
"version": "1.1.2",
"description": "Generates a secure random string with a given length",

@@ -22,3 +22,5 @@ "main": "lib/secure-random-string.js",

"author": "Simon Santoro",
"contributors": ["Mark Stosberg <mark@rideamigos.com>"],
"contributors": [
"Mark Stosberg <mark@rideamigos.com>"
],
"license": "MIT",

@@ -25,0 +27,0 @@ "bugs": {

@@ -11,4 +11,6 @@ # secure-random-string

### Default behavior: Generate a random string 32 characters long.
### Default behavior: Generate a random Base64 encoded string 32 characters long.
This may include alphanumeric characters as well as the following characters: +, /, =.
```javascript

@@ -63,3 +65,3 @@ // Sync

[Mark Stosberg](https://github.com/markstos)
[Mark Stosberg](https://github.com/markstos)
[Sandro Gomez](https://github.com/mrsangrin)

@@ -69,2 +71,2 @@

[MIT](https://github.com/aheckmann/node-ses/blob/master/LICENSE)
[MIT](https://opensource.org/licenses/MIT)

@@ -59,2 +59,10 @@ var srs = require('./lib/secure-random-string.js');

});
srs({alphanumeric: true, length: 40}, function(err, sr) {;
test('Must contain alphanumeric only and be 40 chars long',
sr.match(/^[a-zA-Z0-9_]*$/g)[0] === sr && sr.length === 40,
true
);
});
// sync tests

@@ -61,0 +69,0 @@ test('generate a random string 32 chars long (sync)', srs().length, 32);

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