aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils.ts')
-rw-r--r--src/Utils.ts17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/Utils.ts b/src/Utils.ts
index 3a2bbf9a1..5f9475f23 100644
--- a/src/Utils.ts
+++ b/src/Utils.ts
@@ -7,7 +7,7 @@ import { DocumentType } from './client/documents/DocumentTypes';
import { Colors } from './client/views/global/globalEnums';
import { Message } from './server/Message';
import * as Color from 'color';
-import { action, makeObservable } from 'mobx';
+import { action } from 'mobx';
export namespace Utils {
export let CLICK_TIME = 300;
@@ -56,10 +56,6 @@ export namespace Utils {
return uuid.v5(seed, uuid.v5.URL);
}
- export function GenerateMongoId(id: string): string {
- return id.length !== 36 ? Utils.GenerateDeterministicGuid(id) : id;
- }
-
export function GuestID() {
return '__guest__';
}
@@ -440,17 +436,6 @@ export namespace Utils {
socket.on(message, (room: any) => handler(socket, room));
}
}
-export function copyProps(thing: { props: any; _props: any }, prevProps: any) {
- Object.keys(prevProps).forEach(action(pkey =>
- (prevProps)[pkey] !== (thing.props as any)[pkey] &&
- ((thing._props as any)[pkey] = (thing.props as any)[pkey]))); // prettier-ignore
-}
-export function copyPropsFull(thing: { _prevProps: any; props: any; _props: any }) {
- Object.keys(thing._prevProps).forEach(action(pkey =>
- (thing._prevProps as any)[pkey] !== (thing.props as any)[pkey] &&
- ((thing._props as any)[pkey] = (thing.props as any)[pkey]))); // prettier-ignore
- thing._prevProps = thing.props;
-}
export function OmitKeys(obj: any, keys: string[], pattern?: string, addKeyFunc?: (dup: any) => void): { omit: any; extract: any } {
const omit: any = { ...obj };