add isUUID method
This commit is contained in:
parent
b982e43cd7
commit
e842df426c
2
dist/utils/security.util.cjs.map
vendored
2
dist/utils/security.util.cjs.map
vendored
File diff suppressed because one or more lines are too long
2
dist/utils/security.util.js.map
vendored
2
dist/utils/security.util.js.map
vendored
File diff suppressed because one or more lines are too long
5
dist/utils/string.util.cjs
vendored
5
dist/utils/string.util.cjs
vendored
@ -26,6 +26,7 @@ __export(string_util_exports, {
|
|||||||
hexToBase58: () => hexToBase58,
|
hexToBase58: () => hexToBase58,
|
||||||
isObjectId: () => isObjectId,
|
isObjectId: () => isObjectId,
|
||||||
isTrue: () => isTrue,
|
isTrue: () => isTrue,
|
||||||
|
isUUID: () => isUUID,
|
||||||
string10to62: () => string10to62,
|
string10to62: () => string10to62,
|
||||||
string62to10: () => string62to10
|
string62to10: () => string62to10
|
||||||
});
|
});
|
||||||
@ -121,6 +122,9 @@ function compressHex(e, r) {
|
|||||||
}
|
}
|
||||||
return s + o.join("");
|
return s + o.join("");
|
||||||
}
|
}
|
||||||
|
function isUUID(uuid) {
|
||||||
|
return reNormalUUID.test(uuid);
|
||||||
|
}
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
// Annotate the CommonJS export names for ESM import in node:
|
||||||
0 && (module.exports = {
|
0 && (module.exports = {
|
||||||
base58ToHex,
|
base58ToHex,
|
||||||
@ -130,6 +134,7 @@ function compressHex(e, r) {
|
|||||||
hexToBase58,
|
hexToBase58,
|
||||||
isObjectId,
|
isObjectId,
|
||||||
isTrue,
|
isTrue,
|
||||||
|
isUUID,
|
||||||
string10to62,
|
string10to62,
|
||||||
string62to10
|
string62to10
|
||||||
});
|
});
|
||||||
|
2
dist/utils/string.util.cjs.map
vendored
2
dist/utils/string.util.cjs.map
vendored
File diff suppressed because one or more lines are too long
3
dist/utils/string.util.d.cts
vendored
3
dist/utils/string.util.d.cts
vendored
@ -27,5 +27,6 @@ declare const base58ToHex: (base58String: string) => string;
|
|||||||
declare const hexToBase32: (hexString: string) => string;
|
declare const hexToBase32: (hexString: string) => string;
|
||||||
declare function compressUuid(e: string, t?: boolean): string;
|
declare function compressUuid(e: string, t?: boolean): string;
|
||||||
declare function compressHex(e: string, r: number): string;
|
declare function compressHex(e: string, r: number): string;
|
||||||
|
declare function isUUID(uuid: string): boolean;
|
||||||
|
|
||||||
export { base58ToHex, compressHex, compressUuid, hexToBase32, hexToBase58, isObjectId, isTrue, string10to62, string62to10 };
|
export { base58ToHex, compressHex, compressUuid, hexToBase32, hexToBase58, isObjectId, isTrue, isUUID, string10to62, string62to10 };
|
||||||
|
3
dist/utils/string.util.d.ts
vendored
3
dist/utils/string.util.d.ts
vendored
@ -27,5 +27,6 @@ declare const base58ToHex: (base58String: string) => string;
|
|||||||
declare const hexToBase32: (hexString: string) => string;
|
declare const hexToBase32: (hexString: string) => string;
|
||||||
declare function compressUuid(e: string, t?: boolean): string;
|
declare function compressUuid(e: string, t?: boolean): string;
|
||||||
declare function compressHex(e: string, r: number): string;
|
declare function compressHex(e: string, r: number): string;
|
||||||
|
declare function isUUID(uuid: string): boolean;
|
||||||
|
|
||||||
export { base58ToHex, compressHex, compressUuid, hexToBase32, hexToBase58, isObjectId, isTrue, string10to62, string62to10 };
|
export { base58ToHex, compressHex, compressUuid, hexToBase32, hexToBase58, isObjectId, isTrue, isUUID, string10to62, string62to10 };
|
||||||
|
4
dist/utils/string.util.js
vendored
4
dist/utils/string.util.js
vendored
@ -90,6 +90,9 @@ function compressHex(e, r) {
|
|||||||
}
|
}
|
||||||
return s + o.join("");
|
return s + o.join("");
|
||||||
}
|
}
|
||||||
|
function isUUID(uuid) {
|
||||||
|
return reNormalUUID.test(uuid);
|
||||||
|
}
|
||||||
export {
|
export {
|
||||||
base58ToHex,
|
base58ToHex,
|
||||||
compressHex,
|
compressHex,
|
||||||
@ -98,6 +101,7 @@ export {
|
|||||||
hexToBase58,
|
hexToBase58,
|
||||||
isObjectId,
|
isObjectId,
|
||||||
isTrue,
|
isTrue,
|
||||||
|
isUUID,
|
||||||
string10to62,
|
string10to62,
|
||||||
string62to10
|
string62to10
|
||||||
};
|
};
|
||||||
|
2
dist/utils/string.util.js.map
vendored
2
dist/utils/string.util.js.map
vendored
File diff suppressed because one or more lines are too long
@ -140,3 +140,9 @@ export function compressHex(e: string, r: number) {
|
|||||||
}
|
}
|
||||||
return s + o.join('')
|
return s + o.join('')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function isUUID(uuid: string) {
|
||||||
|
return reNormalUUID.test(uuid)
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user