@graffy/common 0.16.20-alpha.8 → 0.16.20

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/index.cjs CHANGED
@@ -425,7 +425,7 @@ function splitRef($ref) {
425
425
  let customAlphabet = (alphabet, defaultSize = 21) => {
426
426
  return (size = defaultSize) => {
427
427
  let id2 = "";
428
- let i = size;
428
+ let i = size | 0;
429
429
  while (i--) {
430
430
  id2 += alphabet[Math.random() * alphabet.length | 0];
431
431
  }
package/index.mjs CHANGED
@@ -423,7 +423,7 @@ function splitRef($ref) {
423
423
  let customAlphabet = (alphabet, defaultSize = 21) => {
424
424
  return (size = defaultSize) => {
425
425
  let id2 = "";
426
- let i = size;
426
+ let i = size | 0;
427
427
  while (i--) {
428
428
  id2 += alphabet[Math.random() * alphabet.length | 0];
429
429
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graffy/common",
3
3
  "description": "Common libraries that used by various Graffy modules.",
4
4
  "author": "aravind (https://github.com/aravindet)",
5
- "version": "0.16.20-alpha.8",
5
+ "version": "0.16.20",
6
6
  "main": "./index.cjs",
7
7
  "exports": {
8
8
  "import": "./index.mjs",
@@ -16,9 +16,9 @@
16
16
  },
17
17
  "license": "Apache-2.0",
18
18
  "dependencies": {
19
+ "debug": "^4.3.3",
19
20
  "lodash": "^4.17.19",
20
- "debug": "^4.3.7",
21
21
  "merge-async-iterators": "^0.2.1",
22
- "@graffy/stream": "0.16.20-alpha.8"
22
+ "@graffy/stream": "0.16.20"
23
23
  }
24
24
  }
@@ -1,5 +1,5 @@
1
1
  export function splitArgs(arg: any): {}[];
2
2
  export function encode(arg: any): {
3
- key: Uint8Array;
3
+ key: Uint8Array<any>;
4
4
  };
5
5
  export function decode(node: any): any;
@@ -1,2 +1,2 @@
1
- export function encode(number: any): Uint8Array;
1
+ export function encode(number: any): Uint8Array<ArrayBuffer>;
2
2
  export function decode(u8Arr: any): number;
@@ -1,2 +1,2 @@
1
- export function encode(string: any): Uint8Array;
1
+ export function encode(string: any): Uint8Array<ArrayBufferLike>;
2
2
  export function decode(u8Arr: any): string;
@@ -1,4 +1,4 @@
1
- export function encode(value: any): Uint8Array;
1
+ export function encode(value: any): Uint8Array<any>;
2
2
  export function decode(buffer: any): any;
3
3
  export const END: 0;
4
4
  export const NULL: 1;
@@ -6,7 +6,7 @@
6
6
  * @returns any
7
7
  */
8
8
  export default function finalize(graph: any, query: any, version?: number | false): {
9
- key: Uint8Array;
10
- end: Uint8Array;
9
+ key: Uint8Array<ArrayBuffer>;
10
+ end: Uint8Array<ArrayBuffer>;
11
11
  version: number;
12
12
  }[];
@@ -11,6 +11,6 @@ export default function makeWatcher(): {
11
11
  value: any;
12
12
  done: boolean;
13
13
  }>;
14
- [Symbol.asyncIterator](): any;
14
+ [Symbol.asyncIterator](): /*elided*/ any;
15
15
  };
16
16
  };
package/types/util.d.ts CHANGED
@@ -11,5 +11,5 @@ export function clone(obj: any): any;
11
11
  export function cmp(a: any, b: any): 0 | 1 | -1;
12
12
  export function find(items: any, compare: any, first?: number, last?: any): number;
13
13
  export function addStringify(buffer: any): any;
14
- export const MIN_KEY: Uint8Array;
15
- export const MAX_KEY: Uint8Array;
14
+ export const MIN_KEY: Uint8Array<ArrayBuffer>;
15
+ export const MAX_KEY: Uint8Array<ArrayBuffer>;