mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
isGuid util
This commit is contained in:
parent
53d08067df
commit
034aefa652
@ -150,6 +150,10 @@ export class Utils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static isGuid(id: string) {
|
||||||
|
return RegExp(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/, 'i').test(id);
|
||||||
|
}
|
||||||
|
|
||||||
static getHostname(uriString: string): string {
|
static getHostname(uriString: string): string {
|
||||||
const url = Utils.getUrl(uriString);
|
const url = Utils.getUrl(uriString);
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user