hedgedoc/src/utils/arrayDuplicatCheck.ts
Philip Molares 128d861512
NotesService: Finished hardcoded functions
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-02-20 16:09:02 +01:00

9 lines
248 B
TypeScript

/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
export function checkArrayForDuplicates<T>(array: Array<T>): boolean {
return new Set(array).size !== array.length;
}