@smakss/random-string
Advanced tools
Comparing version 1.1.3 to 1.1.4
{ | ||
"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 @@ |
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
5171
61