signal-desktop/ts/util/createAvatarData.ts
2021-10-26 14:15:33 -05:00

14 lines
346 B
TypeScript

// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { v4 as uuid } from 'uuid';
import type { AvatarDataType } from '../types/Avatar';
export function createAvatarData(
partialAvatarData: Readonly<Omit<AvatarDataType, 'id'>>
): AvatarDataType {
return {
id: uuid(),
...partialAvatarData,
};
}