Move to protobufjs in ts/groups.ts
This commit is contained in:
parent
972a4cba0c
commit
9f0c630574
30 changed files with 1424 additions and 964 deletions
8
ts/util/isValidGuid.ts
Normal file
8
ts/util/isValidGuid.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Copyright 2017-2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export const isValidGuid = (value: unknown): value is string =>
|
||||
typeof value === 'string' &&
|
||||
/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i.test(
|
||||
value
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue