@bbn/bbn 1.0.152 → 1.0.155

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/env.d.ts CHANGED
@@ -12,6 +12,7 @@ declare const env: {
12
12
  focused: boolean;
13
13
  last_focus: number;
14
14
  sleep: boolean;
15
+ theme: string;
15
16
  /**
16
17
  * @var bbn.env.loaders Object where the props are MD5 of data and url while the values are the requests,
17
18
  * for preventing the same call to be made at the same time
package/dist/env.js CHANGED
@@ -21,6 +21,7 @@ var env = {
21
21
  last_focus: (new Date()).getTime(),
22
22
  /* Sleep mode (tab or window unfocused */
23
23
  sleep: false,
24
+ theme: 'dark',
24
25
  /**
25
26
  * @var bbn.env.loaders Object where the props are MD5 of data and url while the values are the requests,
26
27
  * for preventing the same call to be made at the same time
@@ -2,7 +2,7 @@ import { simpleHash1 } from './simpleHash1.js';
2
2
  import { simpleHash2 } from './simpleHash2.js';
3
3
  var simpleHash = function (str) {
4
4
  var part1 = simpleHash1(str).toString(16).padStart(8, '0');
5
- var part2 = simpleHash2(str).toString(16).padStart(8, '0');
5
+ var part2 = simpleHash2(str).padStart(8, '0');
6
6
  return part1 + part2;
7
7
  };
8
8
  export { simpleHash };
@@ -1,2 +1,2 @@
1
- declare const simpleHash2: (str: string) => number;
1
+ declare const simpleHash2: (str: string) => string;
2
2
  export { simpleHash2 };
@@ -5,6 +5,6 @@ var simpleHash2 = function (str) {
5
5
  hash = char + (hash << 6) + (hash << 16) - hash;
6
6
  hash |= 0; // Convert to 32-bit integer
7
7
  }
8
- return hash;
8
+ return Math.abs(hash).toString(16);
9
9
  };
10
10
  export { simpleHash2 };
package/dist/fn.d.ts CHANGED
@@ -224,7 +224,7 @@ declare const fn: {
224
224
  shuffle: (array: any[]) => any[];
225
225
  simpleHash: (str: any) => string;
226
226
  simpleHash1: (str: string) => number;
227
- simpleHash2: (str: string) => number;
227
+ simpleHash2: (str: string) => string;
228
228
  startChrono: (name: any) => void;
229
229
  stopChrono: (name: any) => number;
230
230
  string2ArrayBuffer: (str: string) => ArrayBuffer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.152",
3
+ "version": "1.0.155",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",