@voiceflow/common 7.15.1 → 7.15.2

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.
@@ -1,4 +1,4 @@
1
1
  export declare class MurmurHash {
2
- static hash(key: string, seed: number): string;
2
+ static hash(key: string, seed?: number): string;
3
3
  }
4
4
  export default MurmurHash;
@@ -4,7 +4,7 @@ exports.MurmurHash = void 0;
4
4
  const murmurhash_wasm_1 = require("murmurhash-wasm");
5
5
  const hex2abc_1 = require("./hex2abc");
6
6
  class MurmurHash {
7
- static hash(key, seed) {
7
+ static hash(key, seed = 0) {
8
8
  const hash = murmurhash_wasm_1.MurmurHash3.hash32(key, seed);
9
9
  const value = hash.readUInt32BE();
10
10
  const hex = value.toString(16);
@@ -1 +1 @@
1
- {"version":3,"file":"murmurhash.js","sourceRoot":"","sources":["../../../src/crypto/murmurhash.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAE9C,uCAA2C;AAE3C,MAAa,UAAU;IACd,MAAM,CAAC,IAAI,CAAC,GAAW,EAAE,IAAY;QAC1C,MAAM,IAAI,GAAG,6BAAW,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAE/B,OAAO,iBAAO,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;CACF;AARD,gCAQC;AAED,kBAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"murmurhash.js","sourceRoot":"","sources":["../../../src/crypto/murmurhash.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAE9C,uCAA2C;AAE3C,MAAa,UAAU;IACd,MAAM,CAAC,IAAI,CAAC,GAAW,EAAE,IAAI,GAAG,CAAC;QACtC,MAAM,IAAI,GAAG,6BAAW,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAE/B,OAAO,iBAAO,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;CACF;AARD,gCAQC;AAED,kBAAe,UAAU,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export declare class MurmurHash {
2
- static hash(key: string, seed: number): string;
2
+ static hash(key: string, seed?: number): string;
3
3
  }
4
4
  export default MurmurHash;
@@ -1,7 +1,7 @@
1
1
  import { MurmurHash3 } from 'murmurhash-wasm';
2
2
  import { hex2abc } from "./hex2abc";
3
3
  export class MurmurHash {
4
- static hash(key, seed) {
4
+ static hash(key, seed = 0) {
5
5
  const hash = MurmurHash3.hash32(key, seed);
6
6
  const value = hash.readUInt32BE();
7
7
  const hex = value.toString(16);
@@ -1 +1 @@
1
- {"version":3,"file":"murmurhash.js","sourceRoot":"","sources":["../../../src/crypto/murmurhash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,kBAAyB;AAE3C,MAAM,OAAO,UAAU;IACd,MAAM,CAAC,IAAI,CAAC,GAAW,EAAE,IAAY;QAC1C,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAE/B,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;CACF;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"murmurhash.js","sourceRoot":"","sources":["../../../src/crypto/murmurhash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,kBAAyB;AAE3C,MAAM,OAAO,UAAU;IACd,MAAM,CAAC,IAAI,CAAC,GAAW,EAAE,IAAI,GAAG,CAAC;QACtC,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAE/B,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;CACF;AAED,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@voiceflow/common",
3
3
  "description": "Junk drawer of utility functions",
4
- "version": "7.15.1",
4
+ "version": "7.15.2",
5
5
  "author": "Voiceflow",
6
6
  "bugs": {
7
7
  "url": "https://github.com/voiceflow/libs/issues"
@@ -13,7 +13,7 @@
13
13
  "cuid": "^2.1.8",
14
14
  "dayjs": "^1.10.7",
15
15
  "lodash": "^4.17.21",
16
- "murmurhash-wasm": "^1.2.2",
16
+ "murmurhash-wasm": "^1.3.0",
17
17
  "number-to-words": "^1.2.4",
18
18
  "typescript-fsa": "3.0.0"
19
19
  },
@@ -73,5 +73,5 @@
73
73
  "test:single": "NODE_ENV=test ts-mocha --paths --config config/tests/mocharc.yml",
74
74
  "test:unit": "NODE_ENV=test nyc --report-dir=nyc_coverage_unit ts-mocha --paths --config config/tests/mocharc.yml 'tests/**/*.unit.ts'"
75
75
  },
76
- "gitHead": "e8185e9ef0c79dc13b3a031b277390a67f89d3b7"
76
+ "gitHead": "e1457b7ca2fbcd636c865b8f3deb80f93b219cfa"
77
77
  }