@splitsoftware/splitio-commons 2.0.0-rc.4 → 2.0.0-rc.6

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 (272) hide show
  1. package/CHANGES.txt +1 -0
  2. package/cjs/integrations/pluggable.js +2 -2
  3. package/cjs/logger/sdkLogger.js +2 -2
  4. package/cjs/readiness/sdkReadinessManager.js +2 -21
  5. package/cjs/sdkClient/client.js +0 -1
  6. package/cjs/sdkClient/clientAttributesDecoration.js +9 -9
  7. package/cjs/sdkClient/clientCS.js +2 -2
  8. package/cjs/services/splitApi.js +13 -13
  9. package/cjs/services/splitHttpClient.js +2 -2
  10. package/cjs/storages/AbstractSplitsCacheAsync.js +1 -4
  11. package/cjs/storages/AbstractSplitsCacheSync.js +1 -4
  12. package/cjs/storages/dataLoader.js +5 -6
  13. package/cjs/storages/findLatencyIndex.js +1 -1
  14. package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +1 -6
  15. package/cjs/storages/inMemory/AttributesCacheInMemory.js +10 -10
  16. package/cjs/storages/inMemory/EventsCacheInMemory.js +1 -1
  17. package/cjs/storages/inMemory/ImpressionsCacheInMemory.js +1 -1
  18. package/cjs/storages/inMemory/InMemoryStorage.js +1 -1
  19. package/cjs/storages/inMemory/InMemoryStorageCS.js +1 -1
  20. package/cjs/storages/inMemory/UniqueKeysCacheInMemoryCS.js +0 -5
  21. package/cjs/storages/inRedis/SplitsCacheInRedis.js +1 -3
  22. package/cjs/storages/inRedis/TelemetryCacheInRedis.js +3 -3
  23. package/cjs/storages/inRedis/UniqueKeysCacheInRedis.js +1 -1
  24. package/cjs/storages/pluggable/EventsCachePluggable.js +1 -1
  25. package/cjs/storages/pluggable/ImpressionsCachePluggable.js +1 -1
  26. package/cjs/storages/pluggable/SegmentsCachePluggable.js +1 -1
  27. package/cjs/storages/pluggable/SplitsCachePluggable.js +3 -3
  28. package/cjs/storages/pluggable/TelemetryCachePluggable.js +3 -3
  29. package/cjs/storages/pluggable/UniqueKeysCachePluggable.js +1 -1
  30. package/cjs/storages/pluggable/inMemoryWrapper.js +1 -1
  31. package/cjs/storages/pluggable/index.js +1 -1
  32. package/cjs/storages/pluggable/wrapperAdapter.js +2 -2
  33. package/cjs/sync/offline/splitsParser/splitsParserFromSettings.js +1 -1
  34. package/cjs/sync/offline/syncManagerOffline.js +1 -1
  35. package/cjs/sync/polling/updaters/mySegmentsUpdater.js +3 -3
  36. package/cjs/sync/polling/updaters/segmentChangesUpdater.js +8 -8
  37. package/cjs/sync/polling/updaters/splitChangesUpdater.js +13 -13
  38. package/cjs/sync/streaming/AuthClient/index.js +2 -2
  39. package/cjs/sync/streaming/SSEClient/index.js +4 -7
  40. package/cjs/sync/streaming/SSEHandler/NotificationKeeper.js +1 -1
  41. package/cjs/sync/streaming/SSEHandler/NotificationParser.js +5 -4
  42. package/cjs/sync/streaming/SSEHandler/index.js +2 -2
  43. package/cjs/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +3 -3
  44. package/cjs/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +2 -2
  45. package/cjs/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +4 -4
  46. package/cjs/sync/streaming/parseUtils.js +13 -13
  47. package/cjs/sync/syncManagerOnline.js +2 -2
  48. package/cjs/sync/syncTask.js +4 -4
  49. package/cjs/trackers/eventTracker.js +2 -2
  50. package/cjs/trackers/impressionsTracker.js +5 -5
  51. package/cjs/trackers/strategy/strategyDebug.js +1 -1
  52. package/cjs/trackers/strategy/strategyNone.js +2 -2
  53. package/cjs/trackers/strategy/strategyOptimized.js +2 -2
  54. package/cjs/trackers/uniqueKeysTracker.js +3 -3
  55. package/cjs/utils/Backoff.js +0 -4
  56. package/cjs/utils/Semver.js +1 -1
  57. package/cjs/utils/base64/index.js +2 -2
  58. package/cjs/utils/decompress/index.js +4 -4
  59. package/cjs/utils/lang/binarySearch.js +2 -2
  60. package/cjs/utils/murmur3/murmur3_128.js +1 -1
  61. package/cjs/utils/murmur3/murmur3_128_x86.js +1 -1
  62. package/cjs/utils/murmur3/murmur3_64.js +1 -1
  63. package/cjs/utils/murmur3/utfx.js +10 -17
  64. package/cjs/utils/promise/wrapper.js +2 -2
  65. package/cjs/utils/settingsValidation/index.js +2 -2
  66. package/cjs/utils/settingsValidation/integrations/common.js +4 -4
  67. package/cjs/utils/settingsValidation/integrations/configurable.js +3 -3
  68. package/cjs/utils/settingsValidation/integrations/pluggable.js +2 -2
  69. package/cjs/utils/settingsValidation/logger/builtinLogger.js +1 -1
  70. package/cjs/utils/settingsValidation/logger/commons.js +1 -1
  71. package/cjs/utils/settingsValidation/logger/pluggableLogger.js +1 -1
  72. package/cjs/utils/settingsValidation/splitFilters.js +8 -11
  73. package/cjs/utils/settingsValidation/storage/storageCS.js +2 -2
  74. package/cjs/utils/settingsValidation/url.js +3 -3
  75. package/esm/integrations/pluggable.js +2 -2
  76. package/esm/logger/sdkLogger.js +2 -2
  77. package/esm/readiness/sdkReadinessManager.js +2 -21
  78. package/esm/sdkClient/client.js +0 -1
  79. package/esm/sdkClient/clientAttributesDecoration.js +9 -9
  80. package/esm/sdkClient/clientCS.js +2 -2
  81. package/esm/services/splitApi.js +13 -13
  82. package/esm/services/splitHttpClient.js +2 -2
  83. package/esm/storages/AbstractSplitsCacheAsync.js +1 -4
  84. package/esm/storages/AbstractSplitsCacheSync.js +1 -4
  85. package/esm/storages/dataLoader.js +5 -6
  86. package/esm/storages/findLatencyIndex.js +1 -1
  87. package/esm/storages/inLocalStorage/SplitsCacheInLocal.js +1 -6
  88. package/esm/storages/inMemory/AttributesCacheInMemory.js +10 -10
  89. package/esm/storages/inMemory/EventsCacheInMemory.js +1 -1
  90. package/esm/storages/inMemory/ImpressionsCacheInMemory.js +1 -1
  91. package/esm/storages/inMemory/InMemoryStorage.js +1 -1
  92. package/esm/storages/inMemory/InMemoryStorageCS.js +1 -1
  93. package/esm/storages/inMemory/UniqueKeysCacheInMemoryCS.js +0 -5
  94. package/esm/storages/inRedis/SplitsCacheInRedis.js +1 -3
  95. package/esm/storages/inRedis/TelemetryCacheInRedis.js +3 -3
  96. package/esm/storages/inRedis/UniqueKeysCacheInRedis.js +1 -1
  97. package/esm/storages/pluggable/EventsCachePluggable.js +1 -1
  98. package/esm/storages/pluggable/ImpressionsCachePluggable.js +1 -1
  99. package/esm/storages/pluggable/SegmentsCachePluggable.js +1 -1
  100. package/esm/storages/pluggable/SplitsCachePluggable.js +3 -3
  101. package/esm/storages/pluggable/TelemetryCachePluggable.js +3 -3
  102. package/esm/storages/pluggable/UniqueKeysCachePluggable.js +1 -1
  103. package/esm/storages/pluggable/inMemoryWrapper.js +1 -1
  104. package/esm/storages/pluggable/index.js +1 -1
  105. package/esm/storages/pluggable/wrapperAdapter.js +2 -2
  106. package/esm/sync/offline/splitsParser/splitsParserFromSettings.js +1 -1
  107. package/esm/sync/offline/syncManagerOffline.js +1 -1
  108. package/esm/sync/polling/updaters/mySegmentsUpdater.js +3 -3
  109. package/esm/sync/polling/updaters/segmentChangesUpdater.js +8 -8
  110. package/esm/sync/polling/updaters/splitChangesUpdater.js +13 -13
  111. package/esm/sync/streaming/AuthClient/index.js +2 -2
  112. package/esm/sync/streaming/SSEClient/index.js +4 -7
  113. package/esm/sync/streaming/SSEHandler/NotificationKeeper.js +1 -1
  114. package/esm/sync/streaming/SSEHandler/NotificationParser.js +5 -4
  115. package/esm/sync/streaming/SSEHandler/index.js +2 -2
  116. package/esm/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +3 -3
  117. package/esm/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +2 -2
  118. package/esm/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +4 -4
  119. package/esm/sync/streaming/parseUtils.js +13 -13
  120. package/esm/sync/syncManagerOnline.js +2 -2
  121. package/esm/sync/syncTask.js +4 -4
  122. package/esm/trackers/eventTracker.js +2 -2
  123. package/esm/trackers/impressionsTracker.js +5 -5
  124. package/esm/trackers/strategy/strategyDebug.js +1 -1
  125. package/esm/trackers/strategy/strategyNone.js +2 -2
  126. package/esm/trackers/strategy/strategyOptimized.js +2 -2
  127. package/esm/trackers/uniqueKeysTracker.js +3 -3
  128. package/esm/utils/Backoff.js +0 -4
  129. package/esm/utils/Semver.js +1 -1
  130. package/esm/utils/base64/index.js +2 -2
  131. package/esm/utils/decompress/index.js +4 -4
  132. package/esm/utils/lang/binarySearch.js +2 -2
  133. package/esm/utils/murmur3/murmur3_128.js +1 -1
  134. package/esm/utils/murmur3/murmur3_128_x86.js +1 -1
  135. package/esm/utils/murmur3/murmur3_64.js +1 -1
  136. package/esm/utils/murmur3/utfx.js +10 -17
  137. package/esm/utils/promise/wrapper.js +2 -2
  138. package/esm/utils/settingsValidation/index.js +2 -2
  139. package/esm/utils/settingsValidation/integrations/common.js +4 -4
  140. package/esm/utils/settingsValidation/integrations/configurable.js +3 -3
  141. package/esm/utils/settingsValidation/integrations/pluggable.js +2 -2
  142. package/esm/utils/settingsValidation/logger/builtinLogger.js +1 -1
  143. package/esm/utils/settingsValidation/logger/commons.js +1 -1
  144. package/esm/utils/settingsValidation/logger/pluggableLogger.js +1 -1
  145. package/esm/utils/settingsValidation/splitFilters.js +8 -11
  146. package/esm/utils/settingsValidation/storage/storageCS.js +2 -2
  147. package/esm/utils/settingsValidation/url.js +3 -3
  148. package/package.json +3 -2
  149. package/src/dtos/types.ts +1 -1
  150. package/src/evaluator/Engine.ts +1 -1
  151. package/src/evaluator/combiners/ifelseif.ts +1 -1
  152. package/src/evaluator/condition/index.ts +1 -1
  153. package/src/evaluator/index.ts +1 -1
  154. package/src/evaluator/parser/index.ts +1 -1
  155. package/src/evaluator/types.ts +1 -1
  156. package/src/evaluator/value/index.ts +1 -1
  157. package/src/evaluator/value/sanitize.ts +1 -1
  158. package/src/integrations/pluggable.ts +3 -3
  159. package/src/integrations/types.ts +3 -2
  160. package/src/listeners/browser.ts +3 -2
  161. package/src/logger/index.ts +6 -6
  162. package/src/logger/sdkLogger.ts +4 -4
  163. package/src/logger/types.ts +11 -13
  164. package/src/readiness/readinessManager.ts +5 -4
  165. package/src/readiness/sdkReadinessManager.ts +6 -23
  166. package/src/readiness/types.ts +5 -4
  167. package/src/sdkClient/client.ts +5 -6
  168. package/src/sdkClient/clientAttributesDecoration.ts +10 -10
  169. package/src/sdkClient/clientCS.ts +5 -5
  170. package/src/sdkClient/clientInputValidation.ts +2 -1
  171. package/src/sdkClient/identity.ts +1 -1
  172. package/src/sdkClient/sdkClient.ts +2 -2
  173. package/src/sdkClient/sdkClientMethod.ts +1 -1
  174. package/src/sdkClient/sdkClientMethodCS.ts +3 -3
  175. package/src/sdkFactory/index.ts +3 -3
  176. package/src/sdkFactory/types.ts +8 -7
  177. package/src/sdkManager/index.ts +2 -1
  178. package/src/services/splitApi.ts +13 -13
  179. package/src/services/splitHttpClient.ts +2 -2
  180. package/src/storages/AbstractMySegmentsCacheSync.ts +1 -1
  181. package/src/storages/AbstractSplitsCacheAsync.ts +1 -4
  182. package/src/storages/AbstractSplitsCacheSync.ts +1 -4
  183. package/src/storages/dataLoader.ts +7 -8
  184. package/src/storages/findLatencyIndex.ts +1 -1
  185. package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +1 -6
  186. package/src/storages/inMemory/AttributesCacheInMemory.ts +11 -11
  187. package/src/storages/inMemory/EventsCacheInMemory.ts +2 -2
  188. package/src/storages/inMemory/ImpressionsCacheInMemory.ts +5 -5
  189. package/src/storages/inMemory/InMemoryStorage.ts +1 -1
  190. package/src/storages/inMemory/InMemoryStorageCS.ts +1 -1
  191. package/src/storages/inMemory/UniqueKeysCacheInMemoryCS.ts +0 -5
  192. package/src/storages/inRedis/EventsCacheInRedis.ts +1 -1
  193. package/src/storages/inRedis/ImpressionsCacheInRedis.ts +2 -2
  194. package/src/storages/inRedis/SplitsCacheInRedis.ts +1 -3
  195. package/src/storages/inRedis/TelemetryCacheInRedis.ts +3 -3
  196. package/src/storages/inRedis/UniqueKeysCacheInRedis.ts +1 -1
  197. package/src/storages/pluggable/EventsCachePluggable.ts +2 -2
  198. package/src/storages/pluggable/ImpressionsCachePluggable.ts +3 -3
  199. package/src/storages/pluggable/SegmentsCachePluggable.ts +1 -1
  200. package/src/storages/pluggable/SplitsCachePluggable.ts +3 -3
  201. package/src/storages/pluggable/TelemetryCachePluggable.ts +3 -3
  202. package/src/storages/pluggable/UniqueKeysCachePluggable.ts +1 -1
  203. package/src/storages/pluggable/inMemoryWrapper.ts +1 -1
  204. package/src/storages/pluggable/index.ts +1 -1
  205. package/src/storages/pluggable/wrapperAdapter.ts +2 -2
  206. package/src/storages/types.ts +51 -68
  207. package/src/storages/utils.ts +3 -2
  208. package/src/sync/offline/splitsParser/splitsParserFromSettings.ts +3 -3
  209. package/src/sync/offline/syncManagerOffline.ts +1 -1
  210. package/src/sync/polling/updaters/mySegmentsUpdater.ts +3 -3
  211. package/src/sync/polling/updaters/segmentChangesUpdater.ts +8 -8
  212. package/src/sync/polling/updaters/splitChangesUpdater.ts +13 -13
  213. package/src/sync/streaming/AuthClient/index.ts +2 -2
  214. package/src/sync/streaming/SSEClient/index.ts +4 -7
  215. package/src/sync/streaming/SSEHandler/NotificationKeeper.ts +1 -1
  216. package/src/sync/streaming/SSEHandler/NotificationParser.ts +5 -4
  217. package/src/sync/streaming/SSEHandler/index.ts +2 -2
  218. package/src/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.ts +3 -3
  219. package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +2 -2
  220. package/src/sync/streaming/UpdateWorkers/SplitsUpdateWorker.ts +4 -4
  221. package/src/sync/streaming/parseUtils.ts +13 -13
  222. package/src/sync/streaming/types.ts +2 -2
  223. package/src/sync/submitters/impressionsSubmitter.ts +2 -2
  224. package/src/sync/submitters/telemetrySubmitter.ts +4 -3
  225. package/src/sync/submitters/types.ts +1 -1
  226. package/src/sync/syncManagerOnline.ts +2 -2
  227. package/src/sync/syncTask.ts +4 -4
  228. package/src/trackers/eventTracker.ts +4 -3
  229. package/src/trackers/impressionObserver/ImpressionObserver.ts +4 -4
  230. package/src/trackers/impressionObserver/buildKey.ts +2 -2
  231. package/src/trackers/impressionObserver/impressionObserverCS.ts +2 -2
  232. package/src/trackers/impressionObserver/impressionObserverSS.ts +2 -2
  233. package/src/trackers/impressionObserver/types.ts +2 -2
  234. package/src/trackers/impressionsTracker.ts +8 -7
  235. package/src/trackers/strategy/strategyDebug.ts +3 -3
  236. package/src/trackers/strategy/strategyNone.ts +4 -4
  237. package/src/trackers/strategy/strategyOptimized.ts +5 -5
  238. package/src/trackers/types.ts +5 -5
  239. package/src/trackers/uniqueKeysTracker.ts +3 -3
  240. package/src/types.ts +37 -1355
  241. package/src/utils/Backoff.ts +0 -4
  242. package/src/utils/MinEventEmitter.ts +2 -3
  243. package/src/utils/MinEvents.ts +2 -2
  244. package/src/utils/Semver.ts +1 -1
  245. package/src/utils/base64/index.ts +2 -2
  246. package/src/utils/constants/index.ts +9 -10
  247. package/src/utils/decompress/index.ts +4 -4
  248. package/src/utils/inputValidation/attributes.ts +1 -1
  249. package/src/utils/inputValidation/eventProperties.ts +1 -1
  250. package/src/utils/inputValidation/key.ts +1 -1
  251. package/src/utils/inputValidation/preloadedData.ts +1 -2
  252. package/src/utils/inputValidation/trafficTypeExistence.ts +2 -2
  253. package/src/utils/key/index.ts +1 -1
  254. package/src/utils/lang/binarySearch.ts +2 -2
  255. package/src/utils/murmur3/murmur3_128.ts +1 -1
  256. package/src/utils/murmur3/murmur3_128_x86.ts +1 -1
  257. package/src/utils/murmur3/murmur3_64.ts +1 -1
  258. package/src/utils/murmur3/utfx.ts +10 -17
  259. package/src/utils/promise/wrapper.ts +2 -2
  260. package/src/utils/settingsValidation/consent.ts +2 -2
  261. package/src/utils/settingsValidation/impressionsMode.ts +1 -1
  262. package/src/utils/settingsValidation/index.ts +2 -2
  263. package/src/utils/settingsValidation/integrations/common.ts +4 -4
  264. package/src/utils/settingsValidation/integrations/configurable.ts +3 -3
  265. package/src/utils/settingsValidation/integrations/pluggable.ts +2 -2
  266. package/src/utils/settingsValidation/logger/builtinLogger.ts +3 -3
  267. package/src/utils/settingsValidation/logger/commons.ts +3 -3
  268. package/src/utils/settingsValidation/logger/pluggableLogger.ts +3 -3
  269. package/src/utils/settingsValidation/splitFilters.ts +9 -12
  270. package/src/utils/settingsValidation/storage/storageCS.ts +5 -4
  271. package/src/utils/settingsValidation/url.ts +3 -3
  272. package/types/splitio.d.ts +1019 -1381
@@ -7,9 +7,9 @@ import { parseLatencyField, parseExceptionField, parseMetadata } from '../utils'
7
7
  var TelemetryCachePluggable = /** @class */ (function () {
8
8
  /**
9
9
  * Create a Telemetry cache that uses a storage wrapper.
10
- * @param log Logger instance.
11
- * @param keys Key builder.
12
- * @param wrapper Adapted wrapper storage.
10
+ * @param log - Logger instance.
11
+ * @param keys - Key builder.
12
+ * @param wrapper - Adapted wrapper storage.
13
13
  */
14
14
  function TelemetryCachePluggable(log, keys, wrapper) {
15
15
  this.log = log;
@@ -45,7 +45,7 @@ var UniqueKeysCachePluggable = /** @class */ (function (_super) {
45
45
  };
46
46
  /**
47
47
  * Async consumer API, used by synchronizer.
48
- * @param count number of items to pop from the queue. If not provided or equal 0, all items will be popped.
48
+ * @param count - number of items to pop from the queue. If not provided or equal 0, all items will be popped.
49
49
  */
50
50
  UniqueKeysCachePluggable.prototype.popNRaw = function (count) {
51
51
  var _this = this;
@@ -5,7 +5,7 @@ import { setToArray } from '../../utils/lang/sets';
5
5
  * The `_cache` property is the object were items are stored.
6
6
  * Intended for testing purposes.
7
7
  *
8
- * @param connDelay delay in millis for `connect` resolve. If not provided, `connect` resolves immediately.
8
+ * @param connDelay - delay in millis for `connect` resolve. If not provided, `connect` resolves immediately.
9
9
  */
10
10
  export function inMemoryWrapperFactory(connDelay) {
11
11
  var _cache = {};
@@ -24,7 +24,7 @@ var NO_VALID_WRAPPER_INTERFACE = 'The provided wrapper instance doesn’t follow
24
24
  /**
25
25
  * Validate pluggable storage factory options.
26
26
  *
27
- * @param options user options
27
+ * @param options - user options
28
28
  * @throws Will throw an error if the options are invalid. Example: wrapper is not provided or doesn't have some methods.
29
29
  */
30
30
  function validatePluggableStorageOptions(options) {
@@ -22,8 +22,8 @@ export var METHODS_TO_PROMISE_WRAP = [
22
22
  * Adapter of the Pluggable Storage Wrapper.
23
23
  * Used to handle exceptions as rejected promises, in order to simplify the error handling on storages.
24
24
  *
25
- * @param log logger instance
26
- * @param wrapper storage wrapper to adapt
25
+ * @param log - logger instance
26
+ * @param wrapper - storage wrapper to adapt
27
27
  * @returns an adapted version of the given storage wrapper
28
28
  */
29
29
  export function wrapperAdapter(log, wrapper) {
@@ -30,7 +30,7 @@ export function splitsParserFromSettingsFactory() {
30
30
  }
31
31
  /**
32
32
  *
33
- * @param settings validated object with mocked features mapping.
33
+ * @param settings - validated object with mocked features mapping.
34
34
  */
35
35
  return function splitsParserFromSettings(settings) {
36
36
  var features = settings.features || {};
@@ -8,7 +8,7 @@ function flush() {
8
8
  * Offline SyncManager factory.
9
9
  * Can be used for server-side API, and client-side API with or without multiple clients.
10
10
  *
11
- * @param splitsParser e.g., `splitsParserFromFile`, `splitsParserFromSettings`.
11
+ * @param splitsParser - e.g., `splitsParserFromFile`, `splitsParserFromSettings`.
12
12
  */
13
13
  export function syncManagerOfflineFactory(splitsParserFactory) {
14
14
  /**
@@ -63,12 +63,12 @@ export function mySegmentsUpdaterFactory(log, mySegmentsFetcher, storage, segmen
63
63
  * MySegments updater returns a promise that resolves with a `false` boolean value if it fails to fetch mySegments or synchronize them with the storage.
64
64
  * Returned promise will not be rejected.
65
65
  *
66
- * @param {SegmentsData | undefined} segmentsData it can be:
66
+ * @param segmentsData - it can be:
67
67
  * (1) the list of mySegments names to sync in the storage,
68
68
  * (2) an object with a segment name and action (true: add, or false: delete) to update the storage,
69
69
  * (3) or `undefined`, for which the updater will fetch mySegments in order to sync the storage.
70
- * @param {boolean | undefined} noCache true to revalidate data to fetch
71
- * @param {boolean | undefined} till query param to bypass CDN requests
70
+ * @param noCache - true to revalidate data to fetch
71
+ * @param till - query param to bypass CDN requests
72
72
  */
73
73
  return function mySegmentsUpdater(segmentsData, noCache, till) {
74
74
  return _mySegmentsUpdater(0, segmentsData, noCache, till);
@@ -6,10 +6,10 @@ import { LOG_PREFIX_INSTANTIATION, LOG_PREFIX_SYNC_SEGMENTS } from '../../../log
6
6
  * - updates `segmentsCache`
7
7
  * - uses `segmentsEventEmitter` to emit events related to segments data updates
8
8
  *
9
- * @param log logger instance
10
- * @param segmentChangesFetcher fetcher of `/segmentChanges`
11
- * @param segments segments storage, with sync or async methods
12
- * @param readiness optional readiness manager. Not required for synchronizer or producer mode.
9
+ * @param log - logger instance
10
+ * @param segmentChangesFetcher - fetcher of `/segmentChanges`
11
+ * @param segments - segments storage, with sync or async methods
12
+ * @param readiness - optional readiness manager. Not required for synchronizer or producer mode.
13
13
  */
14
14
  export function segmentChangesUpdaterFactory(log, segmentChangesFetcher, segments, readiness) {
15
15
  var readyOnAlreadyExistentState = true;
@@ -35,11 +35,11 @@ export function segmentChangesUpdaterFactory(log, segmentChangesFetcher, segment
35
35
  * Thus, a false result doesn't imply that SDK_SEGMENTS_ARRIVED was not emitted.
36
36
  * Returned promise will not be rejected.
37
37
  *
38
- * @param {boolean | undefined} fetchOnlyNew if true, only fetch the segments that not exists, i.e., which `changeNumber` is equal to -1.
38
+ * @param fetchOnlyNew - if true, only fetch the segments that not exists, i.e., which `changeNumber` is equal to -1.
39
39
  * This param is used by SplitUpdateWorker on server-side SDK, to fetch new registered segments on SPLIT_UPDATE notifications.
40
- * @param {string | undefined} segmentName segment name to fetch. By passing `undefined` it fetches the list of segments registered at the storage
41
- * @param {boolean | undefined} noCache true to revalidate data to fetch on a SEGMENT_UPDATE notifications.
42
- * @param {number | undefined} till till target for the provided segmentName, for CDN bypass.
40
+ * @param segmentName - segment name to fetch. By passing `undefined` it fetches the list of segments registered at the storage
41
+ * @param noCache - true to revalidate data to fetch on a SEGMENT_UPDATE notifications.
42
+ * @param till - till target for the provided segmentName, for CDN bypass.
43
43
  */
44
44
  return function segmentChangesUpdater(fetchOnlyNew, segmentName, noCache, till) {
45
45
  log.debug(LOG_PREFIX_SYNC_SEGMENTS + "Started segments update");
@@ -34,8 +34,8 @@ export function parseSegments(_a) {
34
34
  * If there are defined filters and one feature flag doesn't match with them, its status is changed to 'ARCHIVE' to avoid storing it
35
35
  * If there are set filter defined, names filter is ignored
36
36
  *
37
- * @param featureFlag feature flag to be evaluated
38
- * @param filters splitFiltersValidation bySet | byName
37
+ * @param featureFlag - feature flag to be evaluated
38
+ * @param filters - splitFiltersValidation bySet | byName
39
39
  */
40
40
  function matchFilters(featureFlag, filters) {
41
41
  var _a = filters.groupedFilters, setsFilter = _a.bySet, namesFilter = _a.byName, prefixFilter = _a.byPrefix;
@@ -77,13 +77,13 @@ export function computeSplitsMutation(entries, filters) {
77
77
  * - updates `splitsCache`
78
78
  * - uses `splitsEventEmitter` to emit events related to split data updates
79
79
  *
80
- * @param log Logger instance
81
- * @param splitChangesFetcher Fetcher of `/splitChanges`
82
- * @param splits Splits storage, with sync or async methods
83
- * @param segments Segments storage, with sync or async methods
84
- * @param splitsEventEmitter Optional readiness manager. Not required for synchronizer or producer mode.
85
- * @param requestTimeoutBeforeReady How long the updater will wait for the request to timeout. Default 0, i.e., never timeout.
86
- * @param retriesOnFailureBeforeReady How many retries on `/splitChanges` we the updater do in case of failure or timeout. Default 0, i.e., no retries.
80
+ * @param log - Logger instance
81
+ * @param splitChangesFetcher - Fetcher of `/splitChanges`
82
+ * @param splits - Splits storage, with sync or async methods
83
+ * @param segments - Segments storage, with sync or async methods
84
+ * @param splitsEventEmitter - Optional readiness manager. Not required for synchronizer or producer mode.
85
+ * @param requestTimeoutBeforeReady - How long the updater will wait for the request to timeout. Default 0, i.e., never timeout.
86
+ * @param retriesOnFailureBeforeReady - How many retries on `/splitChanges` we the updater do in case of failure or timeout. Default 0, i.e., no retries.
87
87
  */
88
88
  export function splitChangesUpdaterFactory(log, splitChangesFetcher, splits, segments, splitFiltersValidation, splitsEventEmitter, requestTimeoutBeforeReady, retriesOnFailureBeforeReady, isClientSide) {
89
89
  if (requestTimeoutBeforeReady === void 0) { requestTimeoutBeforeReady = 0; }
@@ -110,13 +110,13 @@ export function splitChangesUpdaterFactory(log, splitChangesFetcher, splits, seg
110
110
  * SplitChanges updater returns a promise that resolves with a `false` boolean value if it fails to fetch splits or synchronize them with the storage.
111
111
  * Returned promise will not be rejected.
112
112
  *
113
- * @param {boolean | undefined} noCache true to revalidate data to fetch
114
- * @param {boolean | undefined} till query param to bypass CDN requests
113
+ * @param noCache - true to revalidate data to fetch
114
+ * @param till - query param to bypass CDN requests
115
115
  */
116
116
  return function splitChangesUpdater(noCache, till, splitUpdateNotification) {
117
117
  /**
118
- * @param {number} since current changeNumber at splitsCache
119
- * @param {number} retry current number of retry attempts
118
+ * @param since - current changeNumber at splitsCache
119
+ * @param retry - current number of retry attempts
120
120
  */
121
121
  function _splitChangesUpdater(since, retry) {
122
122
  if (retry === void 0) { retry = 0; }
@@ -5,12 +5,12 @@ import { hash } from '../../../utils/murmur3/murmur3';
5
5
  /**
6
6
  * Factory of authentication function.
7
7
  *
8
- * @param fetchAuth `SplitAPI.fetchAuth` endpoint
8
+ * @param fetchAuth - `SplitAPI.fetchAuth` endpoint
9
9
  */
10
10
  export function authenticateFactory(fetchAuth) {
11
11
  /**
12
12
  * Run authentication requests to Auth Server, and returns a promise that resolves with the decoded JTW token.
13
- * @param {string[] | undefined} userKeys set of user Keys to track membership updates. It is undefined for server-side API.
13
+ * @param userKeys - set of user Keys to track membership updates. It is undefined for server-side API.
14
14
  */
15
15
  return function authenticate(userKeys) {
16
16
  return fetchAuth(userKeys)
@@ -6,8 +6,8 @@ var CONTROL_CHANNEL_REGEX = /^control_/;
6
6
  /**
7
7
  * Build metadata headers for SSE connection.
8
8
  *
9
- * @param {ISettings} settings Validated settings.
10
- * @returns {Record<string, string>} Headers object
9
+ * @param settings - Validated settings.
10
+ * @returns Headers object
11
11
  */
12
12
  function buildSSEHeaders(settings) {
13
13
  var headers = {
@@ -29,8 +29,8 @@ var SSEClient = /** @class */ (function () {
29
29
  /**
30
30
  * SSEClient constructor.
31
31
  *
32
- * @param settings Validated settings.
33
- * @param platform object containing environment-specific dependencies
32
+ * @param settings - Validated settings.
33
+ * @param platform - object containing environment-specific dependencies
34
34
  * @throws 'EventSource API is not available.' if EventSource is not available.
35
35
  */
36
36
  function SSEClient(settings, _a) {
@@ -48,9 +48,6 @@ var SSEClient = /** @class */ (function () {
48
48
  };
49
49
  /**
50
50
  * Open the connection with a given authToken
51
- *
52
- * @param {IAuthTokenPushEnabled} authToken
53
- * @throws {TypeError} Will throw an error if `authToken` is undefined
54
51
  */
55
52
  SSEClient.prototype.open = function (authToken) {
56
53
  var _a;
@@ -5,7 +5,7 @@ var STREAMING_EVENT_TYPES = [OCCUPANCY_PRI, OCCUPANCY_SEC];
5
5
  /**
6
6
  * Factory of notification keeper, which process OCCUPANCY and CONTROL notifications and emits the corresponding push events.
7
7
  *
8
- * @param pushEmitter emitter for events related to streaming support
8
+ * @param pushEmitter - emitter for events related to streaming support
9
9
  */
10
10
  // @TODO update logic to handle OCCUPANCY for any region and rename according to new spec (e.g.: PUSH_SUBSYSTEM_UP --> PUSH_SUBSYSTEM_UP)
11
11
  export function notificationKeeperFactory(pushEmitter, telemetryTracker) {
@@ -5,8 +5,9 @@ import { isString } from '../../../utils/lang';
5
5
  * HTTP errors handled by Ably (e.g., 400 due to invalid token, 401 due to expired token, 500) have the `data` property.
6
6
  * Other network and HTTP errors do not have this property.
7
7
  *
8
- * @param {Object} error
9
- * @throws {SyntaxError} if `error.data` is an invalid JSON string
8
+ * @param error - The error event to parse
9
+ * @returns parsed notification error
10
+ * @throws SyntaxError if `error.data` is an invalid JSON string
10
11
  */
11
12
  export function errorParser(error) {
12
13
  // @ts-ignore
@@ -18,10 +19,10 @@ export function errorParser(error) {
18
19
  * Parses the `data` JSON string of a given SSE message notifications.
19
20
  * Also assigns the type OCCUPANCY, if it corresponds, so that all supported messages (e.g., SPLIT_UPDATE, CONTROL) have a type.
20
21
  *
21
- * @param message
22
+ * @param message - The message event to parse
22
23
  * @returns parsed notification message or undefined if the given event data is falsy (e.g, '' or undefined).
23
24
  * For example, the EventSource implementation of React-Native for iOS emits a message event with empty data for Ably keepalive comments.
24
- * @throws {SyntaxError} if `message.data` or `JSON.parse(message.data).data` are invalid JSON strings
25
+ * @throws SyntaxError if `message.data` or `JSON.parse(message.data).data` are invalid JSON strings
25
26
  */
26
27
  export function messageParser(message) {
27
28
  if (!message.data)
@@ -6,8 +6,8 @@ import { ABLY_ERROR, NON_REQUESTED, SSE_CONNECTION_ERROR } from '../../../utils/
6
6
  /**
7
7
  * Factory for SSEHandler, which processes SSEClient messages and emits the corresponding push events.
8
8
  *
9
- * @param log factory logger
10
- * @param pushEmitter emitter for events related to streaming support
9
+ * @param log - factory logger
10
+ * @param pushEmitter - emitter for events related to streaming support
11
11
  */
12
12
  export function SSEHandlerFactory(log, pushEmitter, telemetryTracker) {
13
13
  var notificationKeeper = notificationKeeperFactory(pushEmitter, telemetryTracker);
@@ -76,9 +76,9 @@ export function MySegmentsUpdateWorker(log, storage, mySegmentsSyncTask, telemet
76
76
  /**
77
77
  * Invoked by NotificationProcessor on MY_(LARGE)_SEGMENTS_UPDATE notifications
78
78
  *
79
- * @param changeNumber change number of the notification
80
- * @param segmentsData data for KeyList or SegmentRemoval instant updates
81
- * @param delay optional time to wait for BoundedFetchRequest or BoundedFetchRequest updates
79
+ * @param changeNumber - change number of the notification
80
+ * @param segmentsData - data for KeyList or SegmentRemoval instant updates
81
+ * @param delay - optional time to wait for BoundedFetchRequest or BoundedFetchRequest updates
82
82
  */
83
83
  put: function (mySegmentsData, payload, delay) {
84
84
  var type = mySegmentsData.type, cn = mySegmentsData.cn;
@@ -72,8 +72,8 @@ export function SegmentsUpdateWorker(log, segmentsSyncTask, segmentsCache) {
72
72
  /**
73
73
  * Invoked by NotificationProcessor on SEGMENT_UPDATE event
74
74
  *
75
- * @param {number} changeNumber change number of the SEGMENT_UPDATE notification
76
- * @param {string} segmentName segment name of the SEGMENT_UPDATE notification
75
+ * @param changeNumber - change number of the SEGMENT_UPDATE notification
76
+ * @param segmentName - segment name of the SEGMENT_UPDATE notification
77
77
  */
78
78
  put: function (_a) {
79
79
  var changeNumber = _a.changeNumber, segmentName = _a.segmentName;
@@ -59,7 +59,7 @@ export function SplitsUpdateWorker(log, splitsCache, splitsSyncTask, splitsEvent
59
59
  /**
60
60
  * Invoked by NotificationProcessor on SPLIT_UPDATE event
61
61
  *
62
- * @param {number} changeNumber change number of the SPLIT_UPDATE notification
62
+ * @param changeNumber - change number of the SPLIT_UPDATE notification
63
63
  */
64
64
  function put(_a, _payload) {
65
65
  var changeNumber = _a.changeNumber, pcn = _a.pcn;
@@ -82,9 +82,9 @@ export function SplitsUpdateWorker(log, splitsCache, splitsSyncTask, splitsEvent
82
82
  /**
83
83
  * Invoked by NotificationProcessor on SPLIT_KILL event
84
84
  *
85
- * @param {number} changeNumber change number of the SPLIT_UPDATE notification
86
- * @param {string} splitName name of split to kill
87
- * @param {string} defaultTreatment default treatment value
85
+ * @param changeNumber - change number of the SPLIT_UPDATE notification
86
+ * @param splitName - name of split to kill
87
+ * @param defaultTreatment - default treatment value
88
88
  */
89
89
  killSplit: function (_a) {
90
90
  var changeNumber = _a.changeNumber, splitName = _a.splitName, defaultTreatment = _a.defaultTreatment;
@@ -13,9 +13,9 @@ function StringToUint8Array(myString) {
13
13
  /**
14
14
  * Decode and decompress 'data' with 'compression' algorithm
15
15
  *
16
- * @param {string} data
17
- * @param {number} compression 1 GZIP, 2 ZLIB
18
- * @returns {Uint8Array}
16
+ * @param data - base64 encoded string
17
+ * @param compression - 1 GZIP, 2 ZLIB
18
+ * @returns
19
19
  * @throws if data string cannot be decoded, decompressed or the provided compression value is invalid (not 1 or 2)
20
20
  */
21
21
  function decompress(data, compression) {
@@ -32,10 +32,10 @@ function decompress(data, compression) {
32
32
  /**
33
33
  * Decode, decompress and parse the provided 'data' into a KeyList object
34
34
  *
35
- * @param {string} data
36
- * @param {number} compression
37
- * @param {boolean} avoidPrecisionLoss true as default, set it as false if dont need to avoid precission loss
38
- * @returns {{a?: string[], r?: string[] }}
35
+ * @param data - base64 encoded string
36
+ * @param compression - 1 GZIP, 2 ZLIB
37
+ * @param avoidPrecisionLoss - true as default, set it as false if dont need to avoid precission loss
38
+ * @returns keyList
39
39
  * @throws if data string cannot be decoded, decompressed or parsed
40
40
  */
41
41
  export function parseKeyList(data, compression, avoidPrecisionLoss) {
@@ -50,9 +50,9 @@ export function parseKeyList(data, compression, avoidPrecisionLoss) {
50
50
  /**
51
51
  * Decode, decompress and parse the provided 'data' into a Bitmap object
52
52
  *
53
- * @param {string} data
54
- * @param {number} compression
55
- * @returns {Uint8Array}
53
+ * @param data - base64 encoded string
54
+ * @param compression - 1 GZIP, 2 ZLIB
55
+ * @returns Bitmap
56
56
  * @throws if data string cannot be decoded or decompressed
57
57
  */
58
58
  export function parseBitmap(data, compression) {
@@ -61,9 +61,9 @@ export function parseBitmap(data, compression) {
61
61
  /**
62
62
  * Check if the 'bitmap' bit at 'hash64hex' position is 1
63
63
  *
64
- * @param {Uint8Array} bitmap
65
- * @param {string} hash64hex 16-chars string, representing a number in hexa
66
- * @returns {boolean}
64
+ * @param bitmap - Uint8Array bitmap
65
+ * @param hash64hex - 16-chars string, representing a number in hexa
66
+ * @returns whether the provided 'hash64hex' index is set in the bitmap
67
67
  */
68
68
  export function isInBitmap(bitmap, hash64hex) {
69
69
  // using the lowest 32 bits as index, to avoid losing precision when converting to number
@@ -7,9 +7,9 @@ import { POLLING, STREAMING, SYNC_MODE_UPDATE } from '../utils/constants';
7
7
  * Online SyncManager factory.
8
8
  * Can be used for server-side API, and client-side API with or without multiple clients.
9
9
  *
10
- * @param pollingManagerFactory allows to specialize the SyncManager for server-side or client-side API by passing
10
+ * @param pollingManagerFactory - allows to specialize the SyncManager for server-side or client-side API by passing
11
11
  * `pollingManagerSSFactory` or `pollingManagerCSFactory` respectively.
12
- * @param pushManagerFactory optional to build a SyncManager with or without streaming support
12
+ * @param pushManagerFactory - optional to build a SyncManager with or without streaming support
13
13
  */
14
14
  export function syncManagerOnlineFactory(pollingManagerFactory, pushManagerFactory) {
15
15
  /**
@@ -3,10 +3,10 @@ import { SYNC_TASK_EXECUTE, SYNC_TASK_START, SYNC_TASK_STOP } from '../logger/co
3
3
  * Creates an object that handles the periodic execution of a given task via "start" and "stop" methods.
4
4
  * The task can be also executed by calling the "execute" method. Multiple calls run sequentially to avoid race conditions (e.g., submitters executed on SDK destroy or full queue, while periodic execution is pending).
5
5
  *
6
- * @param log Logger instance.
7
- * @param task Task to execute that returns a promise that NEVER REJECTS. Otherwise, periodic execution can result in Unhandled Promise Rejections.
8
- * @param period Period in milliseconds to execute the task.
9
- * @param taskName Optional task name for logging.
6
+ * @param log - Logger instance.
7
+ * @param task - Task to execute that returns a promise that NEVER REJECTS. Otherwise, periodic execution can result in Unhandled Promise Rejections.
8
+ * @param period - Period in milliseconds to execute the task.
9
+ * @param taskName - Optional task name for logging.
10
10
  * @returns A sync task that wraps the given task.
11
11
  */
12
12
  export function syncTaskFactory(log, task, period, taskName) {
@@ -6,8 +6,8 @@ import { isConsumerMode } from '../utils/settingsValidation/mode';
6
6
  /**
7
7
  * Event tracker stores events in cache and pass them to the integrations manager if provided.
8
8
  *
9
- * @param eventsCache cache to save events
10
- * @param integrationsManager optional event handler used for integrations
9
+ * @param eventsCache - cache to save events
10
+ * @param integrationsManager - optional event handler used for integrations
11
11
  */
12
12
  export function eventTrackerFactory(settings, eventsCache, whenInit, integrationsManager, telemetryCache) {
13
13
  var log = settings.log, mode = settings.mode;
@@ -5,11 +5,11 @@ import { CONSENT_DECLINED, DEDUPED, QUEUED } from '../utils/constants';
5
5
  /**
6
6
  * Impressions tracker stores impressions in cache and pass them to the listener and integrations manager if provided.
7
7
  *
8
- * @param impressionsCache cache to save impressions
9
- * @param metadata runtime metadata (ip, hostname and version)
10
- * @param impressionListener optional impression listener
11
- * @param integrationsManager optional integrations manager
12
- * @param strategy strategy for impressions tracking.
8
+ * @param impressionsCache - cache to save impressions
9
+ * @param metadata - runtime metadata (ip, hostname and version)
10
+ * @param impressionListener - optional impression listener
11
+ * @param integrationsManager - optional integrations manager
12
+ * @param strategy - strategy for impressions tracking.
13
13
  */
14
14
  export function impressionsTrackerFactory(settings, impressionsCache, strategy, whenInit, integrationsManager, telemetryCache) {
15
15
  var log = settings.log, impressionListener = settings.impressionListener, _a = settings.runtime, ip = _a.ip, hostname = _a.hostname, version = settings.version;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Debug strategy for impressions tracker. Wraps impressions to store and adds previousTime if it corresponds
3
3
  *
4
- * @param impressionsObserver impression observer. Previous time (pt property) is included in impression instances
4
+ * @param impressionsObserver - impression observer. Previous time (pt property) is included in impression instances
5
5
  * @returns IStrategyResult
6
6
  */
7
7
  export function strategyDebugFactory(impressionsObserver) {
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * None strategy for impressions tracker.
3
3
  *
4
- * @param impressionsCounter cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
5
- * @param uniqueKeysTracker unique keys tracker in charge of tracking the unique keys per split.
4
+ * @param impressionsCounter - cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
5
+ * @param uniqueKeysTracker - unique keys tracker in charge of tracking the unique keys per split.
6
6
  * @returns IStrategyResult
7
7
  */
8
8
  export function strategyNoneFactory(impressionsCounter, uniqueKeysTracker) {
@@ -2,8 +2,8 @@ import { truncateTimeFrame } from '../../utils/time';
2
2
  /**
3
3
  * Optimized strategy for impressions tracker. Wraps impressions to store and adds previousTime if it corresponds
4
4
  *
5
- * @param impressionsObserver impression observer. previous time (pt property) is included in impression instances
6
- * @param impressionsCounter cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
5
+ * @param impressionsObserver - impression observer. previous time (pt property) is included in impression instances
6
+ * @param impressionsCounter - cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
7
7
  * @returns IStrategyResult
8
8
  */
9
9
  export function strategyOptimizedFactory(impressionsObserver, impressionsCounter) {
@@ -9,9 +9,9 @@ var noopFilterAdapter = {
9
9
  * Unique Keys Tracker will be in charge of checking if the MTK was already sent to the BE in the last period
10
10
  * or schedule to be sent; if not it will be added in an internal cache and sent in the next post.
11
11
  *
12
- * @param log Logger instance
13
- * @param uniqueKeysCache cache to save unique keys
14
- * @param filterAdapter filter adapter
12
+ * @param log - Logger instance
13
+ * @param uniqueKeysCache - cache to save unique keys
14
+ * @param filterAdapter - filter adapter
15
15
  */
16
16
  export function uniqueKeysTrackerFactory(log, uniqueKeysCache, filterAdapter) {
17
17
  if (filterAdapter === void 0) { filterAdapter = noopFilterAdapter; }
@@ -1,10 +1,6 @@
1
1
  var Backoff = /** @class */ (function () {
2
2
  /**
3
3
  * Schedule function calls with exponential backoff
4
- *
5
- * @param {function} cb
6
- * @param {number} baseMillis
7
- * @param {number} maxMillis
8
4
  */
9
5
  function Backoff(cb, baseMillis, maxMillis) {
10
6
  this.baseMillis = Backoff.__TEST__BASE_MILLIS || baseMillis || Backoff.DEFAULT_BASE_MILLIS;
@@ -70,7 +70,7 @@ var Semver = /** @class */ (function () {
70
70
  /**
71
71
  * Precedence comparision between 2 Semver objects.
72
72
  *
73
- * @return `0` if `this === toCompare`, `-1` if `this < toCompare`, and `1` if `this > toCompare`
73
+ * @returns `0` if `this === toCompare`, `-1` if `this < toCompare`, and `1` if `this > toCompare`
74
74
  */
75
75
  Semver.prototype.compare = function (toCompare) {
76
76
  if (this.version === toCompare.version)
@@ -20,7 +20,7 @@ var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
20
20
  /**
21
21
  * Decode a given string value in Base64 format
22
22
  *
23
- * @param {string} input value to decode
23
+ * @param input - value to decode
24
24
  */
25
25
  export function decodeFromBase64(input) {
26
26
  var str = (String(input)).replace(/[=]+$/, ''); // #31: ExtendScript bad parse of /=
@@ -45,7 +45,7 @@ export function decodeFromBase64(input) {
45
45
  /**
46
46
  * Encode a given string value to Base64 format.
47
47
  *
48
- * @param {string} input value to encode
48
+ * @param input - value to encode
49
49
  */
50
50
  export function encodeToBase64(input) {
51
51
  var str = String(input);
@@ -404,8 +404,8 @@ export var algorithms = (function iifeDecompress() {
404
404
  return {
405
405
  /**
406
406
  * Expands GZIP data
407
- * @param data The data to decompress
408
- * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.
407
+ * @param data - The data to decompress
408
+ * @param out - Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.
409
409
  * @returns The decompressed version of the data
410
410
  */
411
411
  gunzipSync: function (data, out) {
@@ -413,8 +413,8 @@ export var algorithms = (function iifeDecompress() {
413
413
  },
414
414
  /**
415
415
  * Expands Zlib data
416
- * @param data The data to decompress
417
- * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.
416
+ * @param data - The data to decompress
417
+ * @param out - Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.
418
418
  * @returns The decompressed version of the data
419
419
  */
420
420
  unzlibSync: function (data, out) {
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Searches the index of the specified `value` inside an ordered array of `items` using the binary search algorithm.
3
3
  *
4
- * @param items the array to be searched
5
- * @param value the value to be searched for
4
+ * @param items - the array to be searched
5
+ * @param value - the value to be searched for
6
6
  * @returns integer number between 0 and `items.length`. This value is the index of the search value,
7
7
  * if it is contained in the array, or the index at which the value should be inserted to keep the array ordered.
8
8
  */
@@ -208,7 +208,7 @@ function hash128x64(key, seed) {
208
208
  /**
209
209
  * x64 version of Murmur3 for 128bits.
210
210
  *
211
- * @param {string} str
211
+ * @param str - The string to hash.
212
212
  */
213
213
  export function hash128(str, seed) {
214
214
  return hash128x64(UTF16ToUTF8(str), seed >>> 0);
@@ -143,7 +143,7 @@ function hash128x86(key, seed) {
143
143
  * x86 version of Murmur3 for 128bits.
144
144
  * Used by hashImpression128 because in JS it is more efficient than the x64 version, no matter the underlying OS/CPU arch.
145
145
  *
146
- * @param {string} str
146
+ * @param str - The string to hash.
147
147
  */
148
148
  export function hash128(str, seed) {
149
149
  return hash128x86(UTF16ToUTF8(str), seed >>> 0);
@@ -21,7 +21,7 @@ function hex2dec(s) {
21
21
  /**
22
22
  * Gets the higher 64 bits of the x64 version of Murmur3 for 128bits, as decimal and hexadecimal number strings.
23
23
  * Used for MySegments channel V2 notifications.
24
- * @param {string} str
24
+ * @param str - The string to hash
25
25
  */
26
26
  export function hash64(str) {
27
27
  var hex = hash128(str).slice(0, 16);