@metamask/utils 2.1.0 → 3.0.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.
package/dist/test.data.js DELETED
@@ -1,130 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.objectMixedWithUndefinedValues = exports.arrayOfMixedSpecialObjects = exports.arrayOfDifferentKindsOfNumbers = exports.nonSerializableNestedObject = exports.complexObject = void 0;
4
- exports.complexObject = {
5
- data: {
6
- account: {
7
- __typename: 'Account',
8
- registrations: [
9
- {
10
- __typename: 'Registration',
11
- domain: {
12
- __typename: 'Domain',
13
- isMigrated: true,
14
- labelName: 'mycrypto',
15
- labelhash: '0x9a781ca0d227debc3ee76d547c960b0803a6c9f58c6d3b4722f12ede7e6ef7c9',
16
- name: 'mycrypto.eth',
17
- parent: { __typename: 'Domain', name: 'eth' },
18
- },
19
- expiryDate: '1754111315',
20
- },
21
- ],
22
- },
23
- moreComplexity: {
24
- numbers: [
25
- -5e-11,
26
- 5e-9,
27
- 0.000000000001,
28
- -0.00000000009,
29
- 100000.00000008,
30
- -100.88888,
31
- 0.333,
32
- 1000000000000,
33
- ],
34
- moreNestedObjects: {
35
- nestedAgain: {
36
- nestedAgain: {
37
- andAgain: {
38
- andAgain: {
39
- value: true,
40
- again: {
41
- value: false,
42
- },
43
- },
44
- },
45
- },
46
- },
47
- },
48
- differentEncodings: {
49
- ascii: '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~',
50
- utf8: 'šđćčžЀЂЇЄЖФћΣΩδλ',
51
- mixed: 'ABCDEFGHIJ KLMNOPQRST UVWXYZšđćč žЀЂЇЄЖФћΣΩδλ',
52
- specialCharacters: '"\\\n\r\t',
53
- stringWithSpecialEscapedCharacters: "this\nis\nsome\"'string\r\nwith\tspecial\\escaped\tcharacters'",
54
- },
55
- specialObjectsTypesAndValues: {
56
- t: [true, true, true],
57
- f: [false, false, false],
58
- nulls: [null, null, null],
59
- undef: undefined,
60
- mixed: [
61
- null,
62
- undefined,
63
- null,
64
- undefined,
65
- null,
66
- true,
67
- null,
68
- false,
69
- null,
70
- undefined,
71
- ],
72
- inObject: {
73
- valueOne: null,
74
- valueTwo: undefined,
75
- t: true,
76
- f: false,
77
- },
78
- dates: {
79
- someDate: new Date(),
80
- someOther: new Date(2022, 0, 2, 15, 4, 5),
81
- invalidDate: new Date('bad-date-format'),
82
- },
83
- },
84
- },
85
- },
86
- };
87
- exports.nonSerializableNestedObject = {
88
- levelOne: {
89
- levelTwo: {
90
- levelThree: {
91
- levelFour: {
92
- levelFive: () => {
93
- return 'anything';
94
- },
95
- },
96
- },
97
- },
98
- },
99
- };
100
- exports.arrayOfDifferentKindsOfNumbers = [
101
- -5e-11,
102
- 5e-9,
103
- 0.000000000001,
104
- -0.00000000009,
105
- 100000.00000008,
106
- -100.88888,
107
- 0.333,
108
- 1000000000000,
109
- ];
110
- exports.arrayOfMixedSpecialObjects = [
111
- null,
112
- undefined,
113
- null,
114
- undefined,
115
- undefined,
116
- undefined,
117
- null,
118
- null,
119
- null,
120
- undefined,
121
- ];
122
- exports.objectMixedWithUndefinedValues = {
123
- a: undefined,
124
- b: 'b',
125
- c: undefined,
126
- d: 'd',
127
- e: undefined,
128
- f: 'f',
129
- };
130
- //# sourceMappingURL=test.data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test.data.js","sourceRoot":"","sources":["../src/test.data.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IAC3B,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,UAAU,EAAE,SAAS;YACrB,aAAa,EAAE;gBACb;oBACE,UAAU,EAAE,cAAc;oBAC1B,MAAM,EAAE;wBACN,UAAU,EAAE,QAAQ;wBACpB,UAAU,EAAE,IAAI;wBAChB,SAAS,EAAE,UAAU;wBACrB,SAAS,EACP,oEAAoE;wBACtE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AS,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;oBACzC,WAAW,EAAE,IAAI,IAAI,CAAC,iBAAiB,CAAC;iBACzC;aACF;SACF;KACF;CACF,CAAC;AAEW,QAAA,2BAA2B,GAAG;IACzC,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,SAAS,EAAE,GAAG,EAAE;wBACd,OAAO,UAAU,CAAC;oBACpB,CAAC;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEW,QAAA,8BAA8B,GAAG;IAC5C,CAAC,KAAK;IACN,IAAI;IACJ,cAAc;IACd,CAAC,aAAa;IACd,eAAe;IACf,CAAC,SAAS;IACV,KAAK;IACL,aAAa;CACd,CAAC;AAEW,QAAA,0BAA0B,GAAG;IACxC,IAAI;IACJ,SAAS;IACT,IAAI;IACJ,SAAS;IACT,SAAS;IACT,SAAS;IACT,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,SAAS;CACV,CAAC;AAEW,QAAA,8BAA8B,GAAG;IAC5C,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,GAAG;CACP,CAAC","sourcesContent":["export const complexObject = {\n data: {\n account: {\n __typename: 'Account',\n registrations: [\n {\n __typename: 'Registration',\n domain: {\n __typename: 'Domain',\n isMigrated: true,\n labelName: 'mycrypto',\n labelhash:\n '0x9a781ca0d227debc3ee76d547c960b0803a6c9f58c6d3b4722f12ede7e6ef7c9',\n name: 'mycrypto.eth',\n parent: { __typename: 'Domain', name: 'eth' },\n },\n expiryDate: '1754111315',\n },\n ],\n },\n moreComplexity: {\n numbers: [\n -5e-11,\n 5e-9,\n 0.000000000001,\n -0.00000000009,\n 100000.00000008,\n -100.88888,\n 0.333,\n 1000000000000,\n ],\n moreNestedObjects: {\n nestedAgain: {\n nestedAgain: {\n andAgain: {\n andAgain: {\n value: true,\n again: {\n value: false,\n },\n },\n },\n },\n },\n },\n differentEncodings: {\n ascii:\n '!\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~',\n utf8: 'šđćčžЀЂЇЄЖФћΣΩδλ',\n mixed: 'ABCDEFGHIJ KLMNOPQRST UVWXYZšđćč žЀЂЇЄЖФћΣΩδλ',\n specialCharacters: '\"\\\\\\n\\r\\t',\n stringWithSpecialEscapedCharacters:\n \"this\\nis\\nsome\\\"'string\\r\\nwith\\tspecial\\\\escaped\\tcharacters'\",\n },\n specialObjectsTypesAndValues: {\n t: [true, true, true],\n f: [false, false, false],\n nulls: [null, null, null],\n undef: undefined,\n mixed: [\n null,\n undefined,\n null,\n undefined,\n null,\n true,\n null,\n false,\n null,\n undefined,\n ],\n inObject: {\n valueOne: null,\n valueTwo: undefined,\n t: true,\n f: false,\n },\n dates: {\n someDate: new Date(),\n someOther: new Date(2022, 0, 2, 15, 4, 5),\n invalidDate: new Date('bad-date-format'),\n },\n },\n },\n },\n};\n\nexport const nonSerializableNestedObject = {\n levelOne: {\n levelTwo: {\n levelThree: {\n levelFour: {\n levelFive: () => {\n return 'anything';\n },\n },\n },\n },\n },\n};\n\nexport const arrayOfDifferentKindsOfNumbers = [\n -5e-11,\n 5e-9,\n 0.000000000001,\n -0.00000000009,\n 100000.00000008,\n -100.88888,\n 0.333,\n 1000000000000,\n];\n\nexport const arrayOfMixedSpecialObjects = [\n null,\n undefined,\n null,\n undefined,\n undefined,\n undefined,\n null,\n null,\n null,\n undefined,\n];\n\nexport const objectMixedWithUndefinedValues = {\n a: undefined,\n b: 'b',\n c: undefined,\n d: 'd',\n e: undefined,\n f: 'f',\n};\n"]}