@cexy/hoonfca 1.0.1 → 1.0.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.
Files changed (170) hide show
  1. package/.travis.yml +6 -0
  2. package/LICENSE-MIT +21 -0
  3. package/index.d.ts +620 -0
  4. package/index.js +778 -1
  5. package/package.json +31 -84
  6. package/src/{apis/addExternalModule.js → addExternalModule.js} +4 -5
  7. package/src/addUserToGroup.js +113 -0
  8. package/src/changeAdminStatus.js +95 -0
  9. package/src/changeApprovalMode.js +79 -0
  10. package/src/changeArchivedStatus.js +55 -0
  11. package/src/changeBio.js +76 -0
  12. package/src/changeBlockedStatus.js +47 -0
  13. package/src/changeBlockedStatusMqtt.js +86 -0
  14. package/src/changeGroupImage.js +133 -0
  15. package/src/changeNickname.js +59 -0
  16. package/src/changeThreadColor.js +71 -0
  17. package/src/{apis/changeThreadEmoji.js → changeThreadEmoji.js} +8 -6
  18. package/src/createNewGroup.js +88 -0
  19. package/src/createPoll.js +130 -0
  20. package/src/deleteMessage.js +56 -0
  21. package/src/deleteThread.js +56 -0
  22. package/src/editMessage.js +63 -0
  23. package/src/forwardAttachment.js +60 -0
  24. package/src/forwardMessage.js +63 -0
  25. package/src/getCurrentUserID.js +7 -0
  26. package/src/getEmojiUrl.js +29 -0
  27. package/src/getFriendsList.js +84 -0
  28. package/src/getGroupsList.js +83 -0
  29. package/src/getMarketplace.js +84 -0
  30. package/src/getNotifications.js +86 -0
  31. package/src/getPagesList.js +83 -0
  32. package/src/getStories.js +88 -0
  33. package/src/getThreadHistory.js +647 -0
  34. package/src/getThreadInfo.js +222 -0
  35. package/src/getThreadList.js +292 -0
  36. package/src/getThreadPictures.js +79 -0
  37. package/src/getUserID.js +66 -0
  38. package/src/getUserInfo.js +128 -0
  39. package/src/handleFriendRequest.js +57 -0
  40. package/src/handleMessageRequest.js +65 -0
  41. package/src/{apis/httpGet.js → httpGet.js} +15 -20
  42. package/src/httpPost.js +58 -0
  43. package/src/listenMqtt.js +1018 -0
  44. package/src/logout.js +75 -0
  45. package/src/markAsDelivered.js +58 -0
  46. package/src/{apis/markAsRead.js → markAsRead.js} +19 -30
  47. package/src/markAsReadAll.js +50 -0
  48. package/src/markAsSeen.js +61 -0
  49. package/src/muteThread.js +52 -0
  50. package/src/pinMessage.js +61 -0
  51. package/src/removeUserFromGroup.js +79 -0
  52. package/src/resolvePhotoUrl.js +45 -0
  53. package/src/searchForThread.js +53 -0
  54. package/src/searchUsers.js +89 -0
  55. package/src/sendComment.js +161 -0
  56. package/src/sendMessage.js +457 -0
  57. package/src/sendTypingIndicator.js +179 -0
  58. package/src/setBio.js +86 -0
  59. package/src/setMessageReaction.js +186 -0
  60. package/src/setPostReaction.js +71 -0
  61. package/src/setTheme.js +313 -0
  62. package/src/setTitle.js +90 -0
  63. package/src/shareContact.js +53 -0
  64. package/src/shareLink.js +62 -0
  65. package/src/threadColors.js +57 -0
  66. package/src/unfriend.js +53 -0
  67. package/src/unsendMessage.js +104 -0
  68. package/utils.js +1447 -0
  69. package/LICENSE +0 -3
  70. package/README.md +0 -491
  71. package/examples/login-with-cookies.js +0 -102
  72. package/examples/verify.js +0 -70
  73. package/src/apis/addUserToGroup.js +0 -108
  74. package/src/apis/changeAdminStatus.js +0 -148
  75. package/src/apis/changeArchivedStatus.js +0 -61
  76. package/src/apis/changeAvatar.js +0 -103
  77. package/src/apis/changeBio.js +0 -69
  78. package/src/apis/changeBlockedStatus.js +0 -54
  79. package/src/apis/changeGroupImage.js +0 -136
  80. package/src/apis/changeThreadColor.js +0 -116
  81. package/src/apis/comment.js +0 -207
  82. package/src/apis/createAITheme.js +0 -129
  83. package/src/apis/createNewGroup.js +0 -79
  84. package/src/apis/createPoll.js +0 -73
  85. package/src/apis/deleteMessage.js +0 -44
  86. package/src/apis/deleteThread.js +0 -52
  87. package/src/apis/e2ee.js +0 -17
  88. package/src/apis/editMessage.js +0 -70
  89. package/src/apis/emoji.js +0 -124
  90. package/src/apis/fetchThemeData.js +0 -82
  91. package/src/apis/follow.js +0 -81
  92. package/src/apis/forwardMessage.js +0 -52
  93. package/src/apis/friend.js +0 -243
  94. package/src/apis/gcmember.js +0 -122
  95. package/src/apis/gcname.js +0 -123
  96. package/src/apis/gcrule.js +0 -119
  97. package/src/apis/getAccess.js +0 -111
  98. package/src/apis/getBotInfo.js +0 -88
  99. package/src/apis/getBotInitialData.js +0 -43
  100. package/src/apis/getFriendsList.js +0 -79
  101. package/src/apis/getMessage.js +0 -423
  102. package/src/apis/getTheme.js +0 -95
  103. package/src/apis/getThemeInfo.js +0 -116
  104. package/src/apis/getThreadHistory.js +0 -239
  105. package/src/apis/getThreadInfo.js +0 -267
  106. package/src/apis/getThreadList.js +0 -232
  107. package/src/apis/getThreadPictures.js +0 -58
  108. package/src/apis/getUserID.js +0 -117
  109. package/src/apis/getUserInfo.js +0 -513
  110. package/src/apis/getUserInfoV2.js +0 -146
  111. package/src/apis/handleMessageRequest.js +0 -50
  112. package/src/apis/httpPost.js +0 -89
  113. package/src/apis/httpPostFormData.js +0 -69
  114. package/src/apis/listenMqtt.js +0 -1236
  115. package/src/apis/listenSpeed.js +0 -179
  116. package/src/apis/logout.js +0 -87
  117. package/src/apis/markAsDelivered.js +0 -47
  118. package/src/apis/markAsReadAll.js +0 -40
  119. package/src/apis/markAsSeen.js +0 -70
  120. package/src/apis/mqttDeltaValue.js +0 -278
  121. package/src/apis/muteThread.js +0 -45
  122. package/src/apis/nickname.js +0 -132
  123. package/src/apis/notes.js +0 -163
  124. package/src/apis/pinMessage.js +0 -150
  125. package/src/apis/produceMetaTheme.js +0 -180
  126. package/src/apis/realtime.js +0 -182
  127. package/src/apis/removeUserFromGroup.js +0 -117
  128. package/src/apis/resolvePhotoUrl.js +0 -58
  129. package/src/apis/searchForThread.js +0 -154
  130. package/src/apis/sendMessage.js +0 -354
  131. package/src/apis/sendMessageMqtt.js +0 -249
  132. package/src/apis/sendTypingIndicator.js +0 -91
  133. package/src/apis/setMessageReaction.js +0 -27
  134. package/src/apis/setMessageReactionMqtt.js +0 -61
  135. package/src/apis/setThreadTheme.js +0 -260
  136. package/src/apis/setThreadThemeMqtt.js +0 -94
  137. package/src/apis/share.js +0 -107
  138. package/src/apis/shareContact.js +0 -66
  139. package/src/apis/stickers.js +0 -257
  140. package/src/apis/story.js +0 -181
  141. package/src/apis/theme.js +0 -233
  142. package/src/apis/unfriend.js +0 -47
  143. package/src/apis/unsendMessage.js +0 -17
  144. package/src/engine/client.js +0 -92
  145. package/src/engine/models/buildAPI.js +0 -152
  146. package/src/engine/models/loginHelper.js +0 -519
  147. package/src/engine/models/setOptions.js +0 -88
  148. package/src/security/e2ee.js +0 -109
  149. package/src/types/index.d.ts +0 -498
  150. package/src/utils/antiSuspension.js +0 -506
  151. package/src/utils/auth-helpers.js +0 -149
  152. package/src/utils/autoReLogin.js +0 -336
  153. package/src/utils/axios.js +0 -436
  154. package/src/utils/cache.js +0 -54
  155. package/src/utils/clients.js +0 -282
  156. package/src/utils/constants.js +0 -410
  157. package/src/utils/formatters/data/formatAttachment.js +0 -370
  158. package/src/utils/formatters/data/formatDelta.js +0 -109
  159. package/src/utils/formatters/index.js +0 -159
  160. package/src/utils/formatters/value/formatCookie.js +0 -91
  161. package/src/utils/formatters/value/formatDate.js +0 -36
  162. package/src/utils/formatters/value/formatID.js +0 -16
  163. package/src/utils/formatters.js +0 -1373
  164. package/src/utils/headers.js +0 -230
  165. package/src/utils/index.js +0 -153
  166. package/src/utils/monitoring.js +0 -333
  167. package/src/utils/rateLimiter.js +0 -319
  168. package/src/utils/tokenRefresh.js +0 -657
  169. package/src/utils/user-agents.js +0 -238
  170. package/src/utils/validation.js +0 -157
@@ -1,230 +0,0 @@
1
- "use strict";
2
-
3
- const { randomUserAgent, generateUserAgentByPersona } = require("./user-agents");
4
-
5
- /**
6
- * Strip characters that are illegal in HTTP header values:
7
- * control chars (except HTAB), DEL, CR, LF, and stringified arrays.
8
- * This prevents ERR_INVALID_CHAR crashes that expose bot-like behaviour.
9
- */
10
- function sanitizeHeaderValue(value) {
11
- if (value === null || value === undefined) return '';
12
- let str = String(value);
13
-
14
- // Detect accidentally stringified JS arrays like '["performAutoLogin"]'
15
- if (str.trim().startsWith('[') && str.trim().endsWith(']')) {
16
- try {
17
- const parsed = JSON.parse(str);
18
- if (Array.isArray(parsed)) return '';
19
- } catch (_) {}
20
- }
21
-
22
- // Remove control chars (0x00-0x08, 0x0A-0x1F), DEL (0x7F), CR, LF, brackets
23
- str = str.replace(/[\x00-\x08\x0A-\x1F\x7F\r\n\[\]]/g, '').trim();
24
- return str;
25
- }
26
-
27
- function sanitizeHeaders(headers) {
28
- const out = {};
29
- for (const [key, value] of Object.entries(headers)) {
30
- if (!key || typeof key !== 'string') continue;
31
- const cleanKey = key.replace(/[^\x21-\x7E]/g, '').trim();
32
- if (!cleanKey) continue;
33
- const cleanVal = sanitizeHeaderValue(value);
34
- if (cleanVal !== '') {
35
- out[cleanKey] = cleanVal;
36
- }
37
- }
38
- return out;
39
- }
40
-
41
- const LOCALE_PROFILES = [
42
- 'en-US,en;q=0.9',
43
- 'en-GB,en;q=0.9,en-US;q=0.8',
44
- 'en-US,en;q=0.9,es;q=0.8',
45
- 'en-US,en;q=0.9,fr;q=0.8',
46
- 'en-CA,en;q=0.9,fr;q=0.8',
47
- 'en-AU,en;q=0.9,en-GB;q=0.8'
48
- ];
49
-
50
- const TIMEZONE_OFFSETS = [-480, -420, -360, -300, -240, -180, -120, 0, 60, 120, 180, 240, 300, 360, 480, 540, 600];
51
-
52
- function getRandomLocale() {
53
- return LOCALE_PROFILES[Math.floor(Math.random() * LOCALE_PROFILES.length)];
54
- }
55
-
56
- function getRandomTimezone() {
57
- return TIMEZONE_OFFSETS[Math.floor(Math.random() * TIMEZONE_OFFSETS.length)];
58
- }
59
-
60
- /**
61
- * Generates a comprehensive and realistic set of headers for requests to Facebook.
62
- * @param {string} url - The target URL.
63
- * @param {object} options - Global options from context.
64
- * @param {object} ctx - The application context (containing fb_dtsg, lsd, etc.).
65
- * @param {object} customHeader - Any extra headers to merge.
66
- * @param {string} requestType - Type of request: 'xhr' for GraphQL/AJAX or 'navigate' for page navigation
67
- * @returns {object} A complete headers object.
68
- */
69
- function getHeaders(url, options, ctx, customHeader, requestType = 'navigate') {
70
- const persona = options?.persona || 'desktop';
71
- const isAndroid = persona === 'android' || persona === 'mobile';
72
-
73
- let userAgent, secChUa, secChUaFullVersionList, secChUaPlatform, secChUaPlatformVersion;
74
- let androidData = null;
75
-
76
- if (isAndroid) {
77
- if (options && options.cachedAndroidUA) {
78
- userAgent = options.cachedAndroidUA;
79
- androidData = {
80
- resolution: options.cachedAndroidResolution,
81
- locale: options.cachedAndroidLocale,
82
- device: options.cachedAndroidDevice
83
- };
84
- } else {
85
- const generated = generateUserAgentByPersona('android', options);
86
- userAgent = generated.userAgent;
87
- androidData = {
88
- resolution: generated.resolution,
89
- locale: generated.locale,
90
- device: generated.device
91
- };
92
- }
93
- } else {
94
- if (options && options.cachedUserAgent) {
95
- userAgent = options.cachedUserAgent;
96
- secChUa = options.cachedSecChUa;
97
- secChUaFullVersionList = options.cachedSecChUaFullVersionList;
98
- secChUaPlatform = options.cachedSecChUaPlatform;
99
- secChUaPlatformVersion = options.cachedSecChUaPlatformVersion;
100
- } else {
101
- const generated = randomUserAgent();
102
- userAgent = generated.userAgent;
103
- secChUa = generated.secChUa;
104
- secChUaFullVersionList = generated.secChUaFullVersionList;
105
- secChUaPlatform = generated.secChUaPlatform;
106
- secChUaPlatformVersion = generated.secChUaPlatformVersion;
107
- }
108
- }
109
-
110
- const host = new URL(url).hostname;
111
- const referer = `https://${host}/`;
112
-
113
- const isXhr = requestType === 'xhr';
114
-
115
- const locales = options?.cachedLocale || (androidData?.locale ? androidData.locale.replace('_', '-') : getRandomLocale());
116
- const timezone = options?.cachedTimezone || getRandomTimezone();
117
-
118
- if (isAndroid) {
119
- const headers = {
120
- 'Content-Type': 'application/x-www-form-urlencoded',
121
- 'Host': host,
122
- 'Connection': 'keep-alive',
123
- 'User-Agent': userAgent,
124
- 'Accept': '*/*',
125
- 'Accept-Language': locales,
126
- 'Accept-Encoding': 'gzip, deflate',
127
- 'X-FB-HTTP-Engine': 'Liger'
128
- };
129
-
130
- if (androidData && androidData.resolution) {
131
- headers['X-FB-Client-Density'] = String(androidData.resolution.density);
132
- }
133
-
134
- if (ctx) {
135
- if (ctx.lsd || ctx.fb_dtsg) {
136
- headers['X-Fb-Lsd'] = ctx.lsd || ctx.fb_dtsg;
137
- }
138
- if (ctx.region) {
139
- headers['X-MSGR-Region'] = ctx.region;
140
- }
141
- // Spin params are spread directly into ctx by buildAPI — ctx.master never exists.
142
- if (ctx.__spin_r) headers['X-Fb-Spin-R'] = String(ctx.__spin_r);
143
- if (ctx.__spin_b) headers['X-Fb-Spin-B'] = String(ctx.__spin_b);
144
- if (ctx.__spin_t) headers['X-Fb-Spin-T'] = String(ctx.__spin_t);
145
- }
146
-
147
- if (customHeader) {
148
- Object.assign(headers, customHeader);
149
- if (customHeader.noRef) {
150
- delete headers.Referer;
151
- }
152
- }
153
-
154
- return sanitizeHeaders(headers);
155
- }
156
-
157
- const isWindows = secChUaPlatform === '"Windows"';
158
- const isMac = secChUaPlatform === '"macOS"';
159
- const isLinux = secChUaPlatform === '"Linux"';
160
-
161
- const headers = {
162
- 'Accept': isXhr ? '*/*' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
163
- 'Accept-Language': locales,
164
- 'Accept-Encoding': 'gzip, deflate, br',
165
- 'Cache-Control': 'no-cache',
166
- 'Connection': 'keep-alive',
167
- 'DNT': '1',
168
- 'Dpr': '1',
169
- 'Host': host,
170
- 'Pragma': 'no-cache',
171
- 'Referer': referer,
172
- 'Sec-Ch-Prefers-Color-Scheme': 'light',
173
- 'Sec-Ch-Ua': secChUa,
174
- 'Sec-Ch-Ua-Full-Version-List': secChUaFullVersionList,
175
- 'Sec-Ch-Ua-Mobile': '?0',
176
- 'Sec-Ch-Ua-Model': '""',
177
- 'Sec-Ch-Ua-Platform': secChUaPlatform,
178
- 'Sec-Ch-Ua-Platform-Version': secChUaPlatformVersion,
179
- 'Sec-Fetch-Dest': isXhr ? 'empty' : 'document',
180
- 'Sec-Fetch-Mode': isXhr ? 'cors' : 'navigate',
181
- 'Sec-Fetch-Site': isXhr ? 'same-origin' : 'none',
182
- 'User-Agent': userAgent,
183
- 'Viewport-Width': '1920',
184
- 'X-FB-Timezone-Offset': String(timezone * 60)
185
- };
186
-
187
- if (isWindows || isMac || isLinux) {
188
- headers['Sec-Ch-Ua-Arch'] = '"x86"';
189
- headers['Sec-Ch-Ua-Bitness'] = '"64"';
190
- }
191
-
192
- if (isXhr) {
193
- headers['Origin'] = `https://${host}`;
194
- headers['X-Requested-With'] = 'XMLHttpRequest';
195
- } else {
196
- headers['Sec-Fetch-User'] = '?1';
197
- headers['Upgrade-Insecure-Requests'] = '1';
198
- }
199
-
200
- if (ctx) {
201
- if (ctx.lsd || ctx.fb_dtsg) {
202
- headers['X-Fb-Lsd'] = ctx.lsd || ctx.fb_dtsg;
203
- }
204
- if (ctx.region) {
205
- headers['X-MSGR-Region'] = ctx.region;
206
- }
207
- // Spin params are spread directly into ctx by buildAPI — ctx.master never exists.
208
- if (ctx.__spin_r) headers['X-Fb-Spin-R'] = String(ctx.__spin_r);
209
- if (ctx.__spin_b) headers['X-Fb-Spin-B'] = String(ctx.__spin_b);
210
- if (ctx.__spin_t) headers['X-Fb-Spin-T'] = String(ctx.__spin_t);
211
- }
212
-
213
- if (customHeader) {
214
- Object.assign(headers, customHeader);
215
- if (customHeader.noRef) {
216
- delete headers.Referer;
217
- }
218
- }
219
-
220
- return sanitizeHeaders(headers);
221
- }
222
-
223
- const meta = (prop) => new RegExp(`<meta property="${prop}" content="([^"]*)"`);
224
-
225
- module.exports = {
226
- getHeaders,
227
- meta,
228
- getRandomLocale,
229
- getRandomTimezone
230
- };
@@ -1,153 +0,0 @@
1
- /* eslint-disable no-prototype-builtins */
2
- "use strict";
3
-
4
- const cheerio = require("cheerio");
5
- const util = require("util");
6
-
7
- /**
8
- * Fetches a URL, scrapes all <script type="application/json"> tags, and returns their parsed content.
9
- * @param {string} url - The URL to fetch.
10
- * @param {object} jar - The cookie jar.
11
- * @param {object} qs - Query string parameters.
12
- * @param {object} options - Global options.
13
- * @param {object} ctx - The application context.
14
- * @param {object} customHeader - Custom headers.
15
- * @returns {Promise<Array<Object>>} A promise that resolves with an array of parsed JSON objects.
16
- */
17
- async function json(url, jar, qs, options, ctx, customHeader) {
18
- const network = require("./axios");
19
- const constants = require("./constants");
20
-
21
- try {
22
- const res = await network.get(url, jar, qs, options, ctx, customHeader);
23
- const body = res.body;
24
- const $ = cheerio.load(body);
25
- const scripts = $('script[type="application/json"]');
26
-
27
- if (scripts.length === 0) {
28
- constants.warn(`No <script type="application/json"> tags found on ${url}`);
29
- return [];
30
- }
31
-
32
- const allJsonData = [];
33
- scripts.each((index, element) => {
34
- try {
35
- const jsonContent = $(element).html();
36
- if (jsonContent) {
37
- allJsonData.push(JSON.parse(jsonContent));
38
- }
39
- } catch (e) {
40
- constants.warn(`Could not parse JSON from script #${index + 1} on ${url}`);
41
- }
42
- });
43
-
44
- return allJsonData;
45
- } catch (error) {
46
- constants.error(`Error in utils.json fetching from ${url}:`, error);
47
- throw error;
48
- }
49
- }
50
-
51
- /**
52
- * Creates an object with pre-filled request defaults based on HTML and user context.
53
- * @param {string} html - The HTML content.
54
- * @param {string|number} userID - The user ID.
55
- * @param {object} ctx - The context containing session data.
56
- * @returns {object} An object with .get, .post, and .postFormData methods.
57
- */
58
- function makeDefaults(html, userID, ctx) {
59
- const network = require("./axios");
60
- const constants = require("./constants");
61
-
62
- let reqCounter = 1;
63
- const revision = constants.getFrom(html, 'revision":', ",");
64
-
65
- /**
66
- * Merges provided data with default request parameters.
67
- * @param {object} obj - The original query or form object.
68
- * @returns {object} The merged object.
69
- */
70
- function mergeWithDefaults(obj) {
71
- const newObj = {
72
- av: userID,
73
- __user: userID,
74
- __req: (reqCounter++).toString(36),
75
- __rev: revision,
76
- __a: 1,
77
- ...(ctx && {
78
- fb_dtsg: ctx.fb_dtsg,
79
- jazoest: ctx.jazoest,
80
- }),
81
- };
82
-
83
- if (!obj) return newObj;
84
-
85
- for (const prop in obj) {
86
- if (obj.hasOwnProperty(prop) && !(prop in newObj)) {
87
- newObj[prop] = obj[prop];
88
- }
89
- }
90
-
91
- return newObj;
92
- }
93
-
94
- return {
95
- /**
96
- * Makes a GET request with merged defaults.
97
- * @param {string} url
98
- * @param {object} jar
99
- * @param {object} qs
100
- * @param {object} ctxx
101
- * @param {object} [customHeader={}]
102
- * @returns {Promise<object>}
103
- */
104
- get: (url, jar, qs, ctxx, customHeader = {}) =>
105
- network.get(url, jar, mergeWithDefaults(qs), ctx?.globalOptions, ctxx || ctx, customHeader),
106
-
107
- /**
108
- * Makes a POST request with merged defaults.
109
- * @param {string} url
110
- * @param {object} jar
111
- * @param {object} form
112
- * @param {object} ctxx
113
- * @param {object} [customHeader={}]
114
- * @returns {Promise<object>}
115
- */
116
- post: (url, jar, form, ctxx, customHeader = {}) =>
117
- network.post(url, jar, mergeWithDefaults(form), ctx?.globalOptions, ctxx || ctx, customHeader),
118
-
119
- /**
120
- * Makes a multipart/form-data POST request with merged defaults.
121
- * @param {string} url
122
- * @param {object} jar
123
- * @param {object} form
124
- * @param {object} qs
125
- * @param {object} ctxx
126
- * @returns {Promise<object>}
127
- */
128
- postFormData: (url, jar, form, qs, ctxx) =>
129
- network.postFormData(
130
- url,
131
- jar,
132
- mergeWithDefaults(form),
133
- mergeWithDefaults(qs),
134
- ctx?.globalOptions,
135
- ctxx || ctx
136
- ),
137
- };
138
- }
139
-
140
- module.exports = {
141
- ...require('./axios'),
142
- ...require('./clients'),
143
- ...require('./constants'),
144
- ...require('./formatters'),
145
- ...require('./headers'),
146
- ...require('./user-agents'),
147
- ...require('./antiSuspension'),
148
- ...require('./rateLimiter'),
149
- json,
150
- makeDefaults,
151
- promisify: (func) => util.promisify(func),
152
- delay: (ms) => new Promise(r => setTimeout(r, ms))
153
- };