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

@smakss/random-string

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smakss/random-string - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

2

package.json
{
"name": "@smakss/random-string",
"version": "1.1.3",
"version": "1.1.4",
"description": "Generates random dummy string with random length.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -29,4 +29,8 @@ # Generate random string

## Examples of usage
then to use it within your application you can do it just like this:
Generate a random string:
```js

@@ -36,12 +40,15 @@ randomString();

// Result: 'epTfoad497&p'
// If the input params were empty the length of string will be selected randomly between 1-20.
```
<sub>**NOTE:** If the input params were empty the length of string will be selected randomly between 1-20.<sub>
Generate a random string with a length of 10:
```js
randomString(10);
// Result: 'BD@Z8dKf2%'
// This will generate a random string with a length of 10.
// Result: 'BD@Z8dKf2%'
```
You can provide both length and allowed characters:
```js

@@ -51,3 +58,2 @@ randomString(10, 'abCD#@');

// Result: 'b@@#aDaC##'
// You can provide both length and allowed characters.
```

@@ -54,0 +60,0 @@

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