@voiceflow/common 7.13.4 → 7.14.0

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.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Turns a hexadecimal string into lowercase alphabetical characters.
3
+ *
4
+ * @param hex - The hexadecimal string to convert
5
+ * @returns A string of lowercase alphabetical characters
6
+ */
7
+ export declare const hex2abc: (hex: string) => string;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hex2abc = void 0;
4
+ const mapping = {
5
+ a: 'a',
6
+ b: 'b',
7
+ c: 'c',
8
+ d: 'd',
9
+ e: 'e',
10
+ f: 'f',
11
+ 0: 'g',
12
+ 1: 'h',
13
+ 2: 'i',
14
+ 3: 'j',
15
+ 4: 'k',
16
+ 5: 'l',
17
+ 6: 'm',
18
+ 7: 'n',
19
+ 8: 'o',
20
+ 9: 'p',
21
+ // Just in case someone passes a string like 0xabc
22
+ x: 'x',
23
+ };
24
+ /**
25
+ * Turns a hexadecimal string into lowercase alphabetical characters.
26
+ *
27
+ * @param hex - The hexadecimal string to convert
28
+ * @returns A string of lowercase alphabetical characters
29
+ */
30
+ const hex2abc = (hex) => Array.prototype.map.call(hex.toLowerCase(), (char) => mapping[char]).join('');
31
+ exports.hex2abc = hex2abc;
32
+ //# sourceMappingURL=hex2abc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hex2abc.js","sourceRoot":"","sources":["../../../src/crypto/hex2abc.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG;IACd,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IAEN,kDAAkD;IAClD,CAAC,EAAE,GAAG;CACE,CAAC;AAEX;;;;;GAKG;AACI,MAAM,OAAO,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAA4B,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAAzI,QAAA,OAAO,WAAkI"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Turns a hexadecimal string into lowercase alphabetical characters.
3
+ *
4
+ * @param hex - The hexadecimal string to convert
5
+ * @returns A string of lowercase alphabetical characters
6
+ */
7
+ export declare const hex2abc: (hex: string) => string;
@@ -0,0 +1,28 @@
1
+ const mapping = {
2
+ a: 'a',
3
+ b: 'b',
4
+ c: 'c',
5
+ d: 'd',
6
+ e: 'e',
7
+ f: 'f',
8
+ 0: 'g',
9
+ 1: 'h',
10
+ 2: 'i',
11
+ 3: 'j',
12
+ 4: 'k',
13
+ 5: 'l',
14
+ 6: 'm',
15
+ 7: 'n',
16
+ 8: 'o',
17
+ 9: 'p',
18
+ // Just in case someone passes a string like 0xabc
19
+ x: 'x',
20
+ };
21
+ /**
22
+ * Turns a hexadecimal string into lowercase alphabetical characters.
23
+ *
24
+ * @param hex - The hexadecimal string to convert
25
+ * @returns A string of lowercase alphabetical characters
26
+ */
27
+ export const hex2abc = (hex) => Array.prototype.map.call(hex.toLowerCase(), (char) => mapping[char]).join('');
28
+ //# sourceMappingURL=hex2abc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hex2abc.js","sourceRoot":"","sources":["../../../src/crypto/hex2abc.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;IACd,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IAEN,kDAAkD;IAClD,CAAC,EAAE,GAAG;CACE,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAA4B,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,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.13.4",
4
+ "version": "7.14.0",
5
5
  "author": "Voiceflow",
6
6
  "bugs": {
7
7
  "url": "https://github.com/voiceflow/libs/issues"
@@ -72,5 +72,5 @@
72
72
  "test:single": "NODE_ENV=test ts-mocha --paths --config config/tests/mocharc.yml",
73
73
  "test:unit": "NODE_ENV=test nyc --report-dir=nyc_coverage_unit ts-mocha --paths --config config/tests/mocharc.yml 'tests/**/*.unit.ts'"
74
74
  },
75
- "gitHead": "c068db4e10f5c8896f53f7b54dc5e2f5ce8cd088"
75
+ "gitHead": "d8e510b542d74ec94fe6e20040c83f7c5429ae80"
76
76
  }