aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-01 19:40:50 -0400
committerbobzel <zzzman@gmail.com>2024-10-01 19:40:50 -0400
commite29b76c89532aefaa27c9950981f6405ac3899d9 (patch)
tree7cb437ca67c81e4e0a610dfadcfe632ed6974d70 /src/Utils.ts
parent92d13a93ec871f3f3048b7344528e618845ad76f (diff)
parent45edcb10855ba5a5313ccf2e60c5ba3590d7bcbc (diff)
Merge branch 'master' into alyssa-starter
Diffstat (limited to 'src/Utils.ts')
-rw-r--r--src/Utils.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Utils.ts b/src/Utils.ts
index 0590c6930..724725c23 100644
--- a/src/Utils.ts
+++ b/src/Utils.ts
@@ -1,4 +1,3 @@
-/* eslint-disable @typescript-eslint/no-namespace */
import * as uuid from 'uuid';
export function clamp(n: number, lower: number, upper: number) {
@@ -205,7 +204,6 @@ export function intersectRect(r1: { left: number; top: number; width: number; he
}
export function stringHash(s?: string) {
- // eslint-disable-next-line no-bitwise
return !s ? undefined : Math.abs(s.split('').reduce((a, b) => (n => n & n)((a << 5) - a + b.charCodeAt(0)), 0));
}
@@ -254,6 +252,7 @@ export namespace JSONUtils {
try {
results = JSON.parse(source);
} catch (e) {
+ console.log('JSONparse error: ', e);
results = source;
}
return results;