Socket
Socket
Sign inDemoInstall

@springworks/random-string

Package Overview
Dependencies
Maintainers
2
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@springworks/random-string - npm Package Compare versions

Comparing version 3005.229.0 to 3005.329.0

11

build/main.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRandomString = exports.alphabet_19_AY_omit_0IOQUZ = exports.alphabet_09_AZ_omit_IOQ = exports.alphabet_09_az_AZ = exports.alphabet_09_az = exports.alphabet_az = exports.alphabet_09_af = exports.alphabet_09 = void 0;
const nanoid_1 = require("nanoid");
/**

@@ -77,5 +76,13 @@ * Characters in the range `0-9`.

}
return (0, nanoid_1.customAlphabet)(alphabet, length)();
return fill(alphabet, length);
}
exports.getRandomString = getRandomString;
function fill(alphabet, length) {
const max = alphabet.length - 1;
let value = '';
for (let i = 0; i < length; i++) {
value += alphabet.charAt(Math.min(Math.random() * max, max));
}
return value;
}
//# sourceMappingURL=main.js.map

7

package.json
{
"name": "@springworks/random-string",
"version": "3005.229.0",
"version": "3005.329.0",
"description": "Generate random strings",

@@ -11,5 +11,2 @@ "main": "build/main.js",

"scripts": {},
"dependencies": {
"nanoid": "^3.1.20"
},
"publishConfig": {

@@ -24,3 +21,3 @@ "access": "public"

"homepage": "https://github.com/Springworks/m2h-mono/tree/master/packages/random-string#readme",
"gitHead": "2a017ae43cc3cf43d48a34b0a973e807f153e4c3"
"gitHead": "4af801214f2a5243c9396014b2f838e3c86557d5"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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