Support for creating New Groups

This commit is contained in:
Evan Hahn 2021-03-03 14:09:58 -06:00 committed by Josh Perez
parent 1934120e46
commit 5de4babc0d
56 changed files with 6222 additions and 526 deletions

View file

@ -0,0 +1,12 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { parseIntOrThrow } from './parseIntOrThrow';
export function parseIntWithFallback(value: unknown, fallback: number): number {
try {
return parseIntOrThrow(value, 'Failed to parse');
} catch (err) {
return fallback;
}
}