@applitools/utils
Advanced tools
Comparing version 1.3.35 to 1.3.36
@@ -26,3 +26,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pluralize = exports.extend = exports.wrap = exports.batchify = exports.cachify = exports.absolutizeUrl = exports.removeUndefinedProps = exports.toUriEncoding = exports.toUnAnchoredUri = exports.toString = exports.toJSON = exports.sleep = exports.jwtDecode = exports.guid = exports.getEnvValue = void 0; | ||
exports.pluralize = exports.extend = exports.wrap = exports.batchify = exports.cachify = exports.absolutizeUrl = exports.removeUndefinedProps = exports.toUriEncoding = exports.toUnAnchoredUri = exports.toString = exports.toJSON = exports.sleep = exports.jwtDecode = exports.shortid = exports.guid = exports.getEnvValue = void 0; | ||
const types = __importStar(require("./types")); | ||
@@ -50,2 +50,9 @@ function getEnvValue(name, type) { | ||
exports.guid = guid; | ||
function shortid() { | ||
return 'xxx'.replace(/[x]/g, () => { | ||
const r = (Math.random() * 36) | 0; | ||
return r.toString(36); | ||
}); | ||
} | ||
exports.shortid = shortid; | ||
function jwtDecode(token) { | ||
@@ -52,0 +59,0 @@ let payloadSeg = token.split('.')[1]; |
{ | ||
"name": "@applitools/utils", | ||
"version": "1.3.35", | ||
"version": "1.3.36", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "applitools", |
export declare function getEnvValue<T extends 'boolean' | 'number' | 'string' = 'string'>(name: string, type?: T): T extends 'boolean' ? boolean : T extends 'number' ? number : T extends 'string' ? string : string | undefined; | ||
export declare function guid(): string; | ||
export declare function shortid(): string; | ||
export declare function jwtDecode(token: string): Record<string, any>; | ||
@@ -4,0 +5,0 @@ export declare function sleep(ms: number): Promise<unknown> | undefined; |
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
71692
1303