@fluentfixture/shared
Advanced tools
Comparing version 1.0.6-alpha.2 to 1.0.6-alpha.3
@@ -13,3 +13,3 @@ export declare class Random { | ||
static uuid4(): string; | ||
static string(charset: string, minLength: number, maxLength: number): string; | ||
static string(pool: string, minLength: number, maxLength: number): string; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Random = void 0; | ||
const randomstring = require("randomstring"); | ||
const random_js_1 = require("random-js"); | ||
@@ -39,7 +38,7 @@ class Random { | ||
} | ||
static string(charset, minLength, maxLength) { | ||
static string(pool, minLength, maxLength) { | ||
const length = (minLength === maxLength) | ||
? minLength | ||
: Random.integer(minLength, maxLength); | ||
return randomstring.generate({ length, charset }); | ||
return (0, random_js_1.string)(pool)(this.engine, length); | ||
} | ||
@@ -46,0 +45,0 @@ } |
{ | ||
"name": "@fluentfixture/shared", | ||
"description": "Shared utils of @fluentfixture project. Contains common string, date ,and type utilities.", | ||
"version": "1.0.6-alpha.2", | ||
"version": "1.0.6-alpha.3", | ||
"license": "MIT", | ||
@@ -46,6 +46,5 @@ "main": "lib/index.js", | ||
"dayjs": "1.11.13", | ||
"random-js": "2.1.0", | ||
"randomstring": "1.3.0" | ||
"random-js": "2.1.0" | ||
}, | ||
"gitHead": "abebbe1e52e4b8cfee15bb6baaea5f427b4eeae7" | ||
"gitHead": "05e0a9c7a3860a821173ea3881a1abff2f9869b2" | ||
} |
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
3
18934
394
- Removedrandomstring@1.3.0
- Removedrandombytes@2.0.3(transitive)
- Removedrandomstring@1.3.0(transitive)