@koine/utils 2.0.0-beta.2 → 2.0.0-beta.4

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 (283) hide show
  1. package/Defer.js +23 -18
  2. package/Defer.mjs +6 -5
  3. package/Emitter.js +31 -20
  4. package/Emitter.mjs +13 -16
  5. package/README.md +5 -1
  6. package/accentSets.js +129 -37
  7. package/accentSets.mjs +113 -29
  8. package/addOrReplaceAtIdx.js +27 -10
  9. package/addOrReplaceAtIdx.mjs +9 -6
  10. package/areEqual.js +35 -41
  11. package/areEqual.mjs +16 -22
  12. package/arrayOfAll.js +20 -11
  13. package/arrayOfAll.mjs +1 -6
  14. package/arraySum.js +20 -9
  15. package/arraySum.mjs +1 -4
  16. package/arrayToLookup.js +21 -9
  17. package/arrayToLookup.mjs +2 -4
  18. package/buildUrlQueryString.js +32 -29
  19. package/buildUrlQueryString.mjs +11 -14
  20. package/capitalize.js +21 -9
  21. package/capitalize.mjs +3 -5
  22. package/changeUrlPath.js +23 -17
  23. package/changeUrlPath.mjs +2 -3
  24. package/chunkByChunks.js +35 -24
  25. package/chunkByChunks.mjs +17 -20
  26. package/chunkBySize.js +21 -8
  27. package/chunkBySize.mjs +3 -4
  28. package/clamp.js +19 -6
  29. package/clamp.mjs +1 -2
  30. package/clsx.js +29 -23
  31. package/clsx.mjs +11 -14
  32. package/convertRange.js +20 -7
  33. package/convertRange.mjs +2 -3
  34. package/cookie.js +13 -5
  35. package/cookie.mjs +3 -2
  36. package/createPalette.js +27 -19
  37. package/createPalette.mjs +9 -6
  38. package/debounce.js +27 -21
  39. package/debounce.mjs +9 -17
  40. package/debouncePromise.js +20 -11
  41. package/debouncePromise.mjs +1 -2
  42. package/debounceRaf.js +23 -14
  43. package/debounceRaf.mjs +5 -10
  44. package/decode.js +20 -7
  45. package/decode.mjs +2 -3
  46. package/encode.js +20 -7
  47. package/encode.mjs +2 -3
  48. package/ensureInt.js +20 -9
  49. package/ensureInt.mjs +1 -4
  50. package/env.js +1 -1
  51. package/env.mjs +0 -1
  52. package/errorToString.js +21 -14
  53. package/errorToString.mjs +1 -4
  54. package/findDuplicatedIndexes.js +22 -9
  55. package/findDuplicatedIndexes.mjs +4 -5
  56. package/forin.js +20 -7
  57. package/forin.mjs +2 -3
  58. package/gbToBytes.js +20 -7
  59. package/gbToBytes.mjs +1 -2
  60. package/getEmptyArray.js +25 -16
  61. package/getEmptyArray.mjs +4 -3
  62. package/getKeys.js +20 -6
  63. package/getKeys.mjs +1 -2
  64. package/getMediaQueryWidthResolvers.js +62 -53
  65. package/getMediaQueryWidthResolvers.mjs +44 -49
  66. package/getMediaQueryWidthTailwindScreens.js +36 -18
  67. package/getMediaQueryWidthTailwindScreens.mjs +18 -14
  68. package/getNonce.js +20 -10
  69. package/getNonce.mjs +1 -2
  70. package/getParamAmong.js +22 -19
  71. package/getParamAmong.mjs +2 -4
  72. package/getParamAsInt.js +22 -19
  73. package/getParamAsInt.mjs +2 -4
  74. package/getParamAsString.js +21 -16
  75. package/getParamAsString.mjs +1 -2
  76. package/getType.js +19 -12
  77. package/getType.mjs +2 -4
  78. package/getUrlHashParams.js +20 -13
  79. package/getUrlHashParams.mjs +2 -4
  80. package/getUrlHashPathname.js +20 -8
  81. package/getUrlHashPathname.mjs +1 -3
  82. package/getUrlPathnameParts.js +23 -23
  83. package/getUrlPathnameParts.mjs +2 -7
  84. package/getUrlQueryParams.js +26 -33
  85. package/getUrlQueryParams.mjs +7 -18
  86. package/imgEmptyPixel.js +20 -6
  87. package/imgEmptyPixel.mjs +1 -2
  88. package/index.js +531 -266
  89. package/index.mjs +2 -2
  90. package/invariant.js +24 -12
  91. package/invariant.mjs +6 -8
  92. package/isAnyObject.js +21 -12
  93. package/isAnyObject.mjs +1 -2
  94. package/isArray.js +21 -12
  95. package/isArray.mjs +1 -2
  96. package/isBlob.js +21 -12
  97. package/isBlob.mjs +1 -2
  98. package/isBoolean.js +21 -12
  99. package/isBoolean.mjs +1 -2
  100. package/isBrowser.js +20 -6
  101. package/isBrowser.mjs +1 -2
  102. package/isBrowserNow.js +21 -11
  103. package/isBrowserNow.mjs +1 -2
  104. package/isDate.js +21 -12
  105. package/isDate.mjs +1 -2
  106. package/isEmptyArray.js +21 -12
  107. package/isEmptyArray.mjs +1 -2
  108. package/isEmptyObject.js +21 -12
  109. package/isEmptyObject.mjs +1 -2
  110. package/isEmptyString.js +19 -6
  111. package/isEmptyString.mjs +1 -2
  112. package/isError.js +21 -12
  113. package/isError.mjs +1 -2
  114. package/isExternalUrl.js +24 -18
  115. package/isExternalUrl.mjs +4 -6
  116. package/isFile.js +21 -12
  117. package/isFile.mjs +1 -2
  118. package/isFloat.js +21 -12
  119. package/isFloat.mjs +1 -2
  120. package/isFormData.js +21 -12
  121. package/isFormData.mjs +1 -2
  122. package/isFullArray.js +21 -12
  123. package/isFullArray.mjs +1 -2
  124. package/isFullObject.js +21 -12
  125. package/isFullObject.mjs +1 -2
  126. package/isFullString.js +21 -12
  127. package/isFullString.mjs +1 -2
  128. package/isFunction.js +18 -9
  129. package/isFunction.mjs +1 -2
  130. package/isInt.js +21 -12
  131. package/isInt.mjs +1 -2
  132. package/isMap.js +21 -12
  133. package/isMap.mjs +1 -2
  134. package/isNaNValue.js +21 -12
  135. package/isNaNValue.mjs +1 -2
  136. package/isNegativeNumber.js +21 -12
  137. package/isNegativeNumber.mjs +1 -2
  138. package/isNull.js +21 -12
  139. package/isNull.mjs +1 -2
  140. package/isNullOrUndefined.js +23 -13
  141. package/isNullOrUndefined.mjs +1 -2
  142. package/isNumber.js +21 -14
  143. package/isNumber.mjs +1 -2
  144. package/isObject.js +21 -12
  145. package/isObject.mjs +1 -2
  146. package/isObjectLike.js +21 -14
  147. package/isObjectLike.mjs +1 -2
  148. package/isOneOf.js +19 -11
  149. package/isOneOf.mjs +1 -7
  150. package/isPlainObject.js +22 -15
  151. package/isPlainObject.mjs +3 -6
  152. package/isPositiveNumber.js +21 -12
  153. package/isPositiveNumber.mjs +1 -2
  154. package/isPrimitive.js +26 -22
  155. package/isPrimitive.mjs +5 -11
  156. package/isPromise.js +21 -12
  157. package/isPromise.mjs +1 -2
  158. package/isRegExp.js +21 -12
  159. package/isRegExp.mjs +1 -2
  160. package/isServer.js +22 -11
  161. package/isServer.mjs +1 -2
  162. package/isServerNow.js +21 -11
  163. package/isServerNow.mjs +1 -2
  164. package/isSet.js +21 -12
  165. package/isSet.mjs +1 -2
  166. package/isString.js +21 -12
  167. package/isString.mjs +1 -2
  168. package/isSymbol.js +21 -12
  169. package/isSymbol.mjs +1 -2
  170. package/isType.js +22 -17
  171. package/isType.mjs +3 -5
  172. package/isUndefined.js +21 -12
  173. package/isUndefined.mjs +1 -2
  174. package/isWeakMap.js +21 -12
  175. package/isWeakMap.mjs +1 -2
  176. package/isWeakSet.js +21 -12
  177. package/isWeakSet.mjs +1 -2
  178. package/kbToBytes.js +20 -7
  179. package/kbToBytes.mjs +1 -2
  180. package/location.js +6 -2
  181. package/location.mjs +3 -1
  182. package/lowercase.js +20 -9
  183. package/lowercase.mjs +1 -4
  184. package/mapListBy.js +21 -10
  185. package/mapListBy.mjs +2 -5
  186. package/matchSorter.js +132 -133
  187. package/matchSorter.mjs +108 -126
  188. package/mbToBytes.js +20 -7
  189. package/mbToBytes.mjs +1 -2
  190. package/mergeObjects.d.ts +1 -1
  191. package/mergeObjects.js +24 -26
  192. package/mergeObjects.mjs +12 -15
  193. package/mergeUrlQueryParams.js +25 -20
  194. package/mergeUrlQueryParams.mjs +4 -8
  195. package/moveSortableArrayItemByKey.js +26 -12
  196. package/moveSortableArrayItemByKey.mjs +8 -8
  197. package/noop.js +20 -7
  198. package/noop.mjs +1 -2
  199. package/normaliseUrl.js +22 -18
  200. package/normaliseUrl.mjs +1 -3
  201. package/normaliseUrlPathname.js +22 -17
  202. package/normaliseUrlPathname.mjs +1 -3
  203. package/objectOmit.js +21 -9
  204. package/objectOmit.mjs +3 -5
  205. package/objectPick.js +22 -9
  206. package/objectPick.mjs +4 -5
  207. package/package.json +11 -8
  208. package/parseCookie.js +29 -26
  209. package/parseCookie.mjs +11 -15
  210. package/parseURL.js +23 -10
  211. package/parseURL.mjs +5 -6
  212. package/quaranteneProps.js +24 -12
  213. package/quaranteneProps.mjs +6 -8
  214. package/randomInt.js +19 -6
  215. package/randomInt.mjs +1 -2
  216. package/randomKey.js +21 -8
  217. package/randomKey.mjs +3 -4
  218. package/readCookie.js +25 -12
  219. package/readCookie.mjs +7 -8
  220. package/removeAccents.js +24 -15
  221. package/removeAccents.mjs +5 -8
  222. package/removeCookie.js +26 -17
  223. package/removeCookie.mjs +6 -5
  224. package/removeDuplicates.js +1 -1
  225. package/removeDuplicates.mjs +0 -1
  226. package/removeDuplicatesByKey.js +24 -12
  227. package/removeDuplicatesByKey.mjs +5 -7
  228. package/removeDuplicatesComparing.js +22 -11
  229. package/removeDuplicatesComparing.mjs +3 -4
  230. package/removeIndexesFromArray.js +21 -8
  231. package/removeIndexesFromArray.mjs +3 -4
  232. package/removeTrailingSlash.js +20 -8
  233. package/removeTrailingSlash.mjs +1 -3
  234. package/removeUrlQueryParams.js +27 -20
  235. package/removeUrlQueryParams.mjs +5 -7
  236. package/render.js +61 -137
  237. package/render.mjs +43 -98
  238. package/roundTo.js +34 -22
  239. package/roundTo.mjs +15 -17
  240. package/serializeCookie.js +29 -35
  241. package/serializeCookie.mjs +9 -15
  242. package/setCookie.js +37 -31
  243. package/setCookie.mjs +13 -16
  244. package/shuffle.js +28 -14
  245. package/shuffle.mjs +10 -10
  246. package/slugify.js +33 -25
  247. package/slugify.mjs +13 -11
  248. package/split.js +18 -4
  249. package/swapMap.js +22 -10
  250. package/swapMap.mjs +3 -5
  251. package/throttle.d.ts +1 -0
  252. package/throttle.js +23 -15
  253. package/throttle.mjs +5 -11
  254. package/titleCase.js +20 -11
  255. package/titleCase.mjs +1 -6
  256. package/toNumber.js +20 -9
  257. package/toNumber.mjs +1 -2
  258. package/toRgba.js +22 -10
  259. package/toRgba.mjs +3 -5
  260. package/transformToUrlPathname.js +21 -18
  261. package/transformToUrlPathname.mjs +2 -5
  262. package/truncate.js +20 -13
  263. package/truncate.mjs +1 -8
  264. package/tryUntil.js +26 -15
  265. package/tryUntil.mjs +7 -10
  266. package/types.js +4 -1
  267. package/types.mjs +2 -1
  268. package/uid.js +21 -13
  269. package/uid.mjs +3 -5
  270. package/updateLinkParams.js +21 -14
  271. package/updateLinkParams.mjs +2 -3
  272. package/updateUrlQueryParams.js +26 -21
  273. package/updateUrlQueryParams.mjs +3 -7
  274. package/uppercase.js +20 -9
  275. package/uppercase.mjs +1 -4
  276. package/uuid.js +21 -10
  277. package/uuid.mjs +2 -5
  278. package/uuidNumeric.js +20 -7
  279. package/uuidNumeric.mjs +1 -2
  280. package/wait.js +20 -9
  281. package/wait.mjs +1 -4
  282. package/without.js +2 -3
  283. package/without.mjs +1 -3
package/index.mjs CHANGED
@@ -15,7 +15,7 @@ export { convertRange } from "./convertRange";
15
15
  export { createPalette } from "./createPalette";
16
16
  export { debounce } from "./debounce";
17
17
  export { debounceRaf } from "./debounceRaf";
18
- export { debouncePromise, } from "./debouncePromise";
18
+ export { debouncePromise } from "./debouncePromise";
19
19
  export { decode } from "./decode";
20
20
  export { Defer } from "./Defer";
21
21
  export { Emitter } from "./Emitter";
@@ -34,7 +34,7 @@ export { getNonce } from "./getNonce";
34
34
  export { getParamAmong } from "./getParamAmong";
35
35
  export { getParamAsInt } from "./getParamAsInt";
36
36
  export { getParamAsString } from "./getParamAsString";
37
- export { getType, } from "./getType";
37
+ export { getType } from "./getType";
38
38
  export { getUrlHashParams } from "./getUrlHashParams";
39
39
  export { getUrlHashPathname } from "./getUrlHashPathname";
40
40
  export { getUrlPathnameParts } from "./getUrlPathnameParts";
package/invariant.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.invariant = void 0;
4
1
  /**
5
2
  * FIXME: invariant calls do not get tree shaked in minified output of projects
6
3
  * using it. Let's not use it internally and not export it from `@koine/utils`
@@ -17,22 +14,37 @@ exports.invariant = void 0;
17
14
  * @param message A string or a function that returns a string
18
15
  * @param lib The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
19
16
  * @param prefix The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
20
- */
17
+ */ "use strict";
18
+ Object.defineProperty(exports, "__esModule", {
19
+ value: true
20
+ });
21
+ function _export(target, all) {
22
+ for(var name in all)Object.defineProperty(target, name, {
23
+ enumerable: true,
24
+ get: all[name]
25
+ });
26
+ }
27
+ _export(exports, {
28
+ invariant: function() {
29
+ return invariant;
30
+ },
31
+ default: function() {
32
+ return _default;
33
+ }
34
+ });
21
35
  function invariant(condition, message, lib, prefix) {
22
36
  if (process.env["NODE_ENV"] !== "production") {
23
37
  if (condition) {
24
38
  return;
25
39
  }
26
- var msgProvided = typeof message === "function" ? message() : message;
27
- var msgPrefix = "";
40
+ const msgProvided = typeof message === "function" ? message() : message;
41
+ let msgPrefix = "";
28
42
  if (lib && prefix) {
29
- msgPrefix = "[".concat(lib, ":").concat(prefix, "] ");
30
- }
31
- else if (lib) {
32
- msgPrefix = "[".concat(lib, "] ");
43
+ msgPrefix = `[${lib}:${prefix}] `;
44
+ } else if (lib) {
45
+ msgPrefix = `[${lib}] `;
33
46
  }
34
47
  throw new Error(msgPrefix + msgProvided);
35
48
  }
36
49
  }
37
- exports.invariant = invariant;
38
- exports.default = invariant;
50
+ const _default = invariant;
package/invariant.mjs CHANGED
@@ -14,19 +14,17 @@
14
14
  * @param message A string or a function that returns a string
15
15
  * @param lib The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
16
16
  * @param prefix The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
17
- */
18
- export function invariant(condition, message, lib, prefix) {
17
+ */ export function invariant(condition, message, lib, prefix) {
19
18
  if (process.env["NODE_ENV"] !== "production") {
20
19
  if (condition) {
21
20
  return;
22
21
  }
23
- var msgProvided = typeof message === "function" ? message() : message;
24
- var msgPrefix = "";
22
+ const msgProvided = typeof message === "function" ? message() : message;
23
+ let msgPrefix = "";
25
24
  if (lib && prefix) {
26
- msgPrefix = "[".concat(lib, ":").concat(prefix, "] ");
27
- }
28
- else if (lib) {
29
- msgPrefix = "[".concat(lib, "] ");
25
+ msgPrefix = `[${lib}:${prefix}] `;
26
+ } else if (lib) {
27
+ msgPrefix = `[${lib}] `;
30
28
  }
31
29
  throw new Error(msgPrefix + msgProvided);
32
30
  }
package/isAnyObject.js CHANGED
@@ -1,15 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isAnyObject = void 0;
4
- var tslib_1 = require("tslib");
5
- var getType_1 = tslib_1.__importDefault(require("./getType"));
6
- /**
7
- * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
8
- *
9
- * @category is
10
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isAnyObject: function() {
13
+ return isAnyObject;
14
+ },
15
+ default: function() {
16
+ return _default;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
11
21
  function isAnyObject(payload) {
12
- return (0, getType_1.default)(payload) === "Object";
22
+ return (0, _getType.default)(payload) === "Object";
13
23
  }
14
- exports.isAnyObject = isAnyObject;
15
- exports.default = isAnyObject;
24
+ const _default = isAnyObject;
package/isAnyObject.mjs CHANGED
@@ -3,8 +3,7 @@ import getType from "./getType";
3
3
  * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
4
4
  *
5
5
  * @category is
6
- */
7
- export function isAnyObject(payload) {
6
+ */ export function isAnyObject(payload) {
8
7
  return getType(payload) === "Object";
9
8
  }
10
9
  export default isAnyObject;
package/isArray.js CHANGED
@@ -1,15 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isArray = void 0;
4
- var tslib_1 = require("tslib");
5
- var getType_1 = tslib_1.__importDefault(require("./getType"));
6
- /**
7
- * Returns whether the payload is an array
8
- *
9
- * @category is
10
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isArray: function() {
13
+ return isArray;
14
+ },
15
+ default: function() {
16
+ return _default;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
11
21
  function isArray(payload) {
12
- return (0, getType_1.default)(payload) === "Array";
22
+ return (0, _getType.default)(payload) === "Array";
13
23
  }
14
- exports.isArray = isArray;
15
- exports.default = isArray;
24
+ const _default = isArray;
package/isArray.mjs CHANGED
@@ -3,8 +3,7 @@ import getType from "./getType";
3
3
  * Returns whether the payload is an array
4
4
  *
5
5
  * @category is
6
- */
7
- export function isArray(payload) {
6
+ */ export function isArray(payload) {
8
7
  return getType(payload) === "Array";
9
8
  }
10
9
  export default isArray;
package/isBlob.js CHANGED
@@ -1,15 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isBlob = void 0;
4
- var tslib_1 = require("tslib");
5
- var getType_1 = tslib_1.__importDefault(require("./getType"));
6
- /**
7
- * Returns whether the payload is a Blob
8
- *
9
- * @category is
10
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isBlob: function() {
13
+ return isBlob;
14
+ },
15
+ default: function() {
16
+ return _default;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
11
21
  function isBlob(payload) {
12
- return (0, getType_1.default)(payload) === "Blob";
22
+ return (0, _getType.default)(payload) === "Blob";
13
23
  }
14
- exports.isBlob = isBlob;
15
- exports.default = isBlob;
24
+ const _default = isBlob;
package/isBlob.mjs CHANGED
@@ -3,8 +3,7 @@ import getType from "./getType";
3
3
  * Returns whether the payload is a Blob
4
4
  *
5
5
  * @category is
6
- */
7
- export function isBlob(payload) {
6
+ */ export function isBlob(payload) {
8
7
  return getType(payload) === "Blob";
9
8
  }
10
9
  export default isBlob;
package/isBoolean.js CHANGED
@@ -1,15 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isBoolean = void 0;
4
- var tslib_1 = require("tslib");
5
- var getType_1 = tslib_1.__importDefault(require("./getType"));
6
- /**
7
- * Returns whether the payload is a boolean
8
- *
9
- * @category is
10
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isBoolean: function() {
13
+ return isBoolean;
14
+ },
15
+ default: function() {
16
+ return _default;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
11
21
  function isBoolean(payload) {
12
- return (0, getType_1.default)(payload) === "Boolean";
22
+ return (0, _getType.default)(payload) === "Boolean";
13
23
  }
14
- exports.isBoolean = isBoolean;
15
- exports.default = isBoolean;
24
+ const _default = isBoolean;
package/isBoolean.mjs CHANGED
@@ -3,8 +3,7 @@ import getType from "./getType";
3
3
  * Returns whether the payload is a boolean
4
4
  *
5
5
  * @category is
6
- */
7
- export function isBoolean(payload) {
6
+ */ export function isBoolean(payload) {
8
7
  return getType(payload) === "Boolean";
9
8
  }
10
9
  export default isBoolean;
package/isBrowser.js CHANGED
@@ -1,9 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isBrowser = void 0;
4
1
  /**
5
2
  * @category ssr
6
3
  * @category is
7
- */
8
- exports.isBrowser = typeof window !== "undefined";
9
- exports.default = exports.isBrowser;
4
+ */ "use strict";
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ function _export(target, all) {
9
+ for(var name in all)Object.defineProperty(target, name, {
10
+ enumerable: true,
11
+ get: all[name]
12
+ });
13
+ }
14
+ _export(exports, {
15
+ isBrowser: function() {
16
+ return isBrowser;
17
+ },
18
+ default: function() {
19
+ return _default;
20
+ }
21
+ });
22
+ const isBrowser = typeof window !== "undefined";
23
+ const _default = isBrowser;
package/isBrowser.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * @category ssr
3
3
  * @category is
4
- */
5
- export var isBrowser = typeof window !== "undefined";
4
+ */ export const isBrowser = typeof window !== "undefined";
6
5
  export default isBrowser;
package/isBrowserNow.js CHANGED
@@ -1,12 +1,22 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isBrowserNow = void 0;
4
- var tslib_1 = require("tslib");
5
- var isUndefined_1 = tslib_1.__importDefault(require("./isUndefined"));
6
- /**
7
- * @category ssr
8
- * @category is
9
- */
10
- var isBrowserNow = function () { return !(0, isUndefined_1.default)(window); };
11
- exports.isBrowserNow = isBrowserNow;
12
- exports.default = exports.isBrowserNow;
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isBrowserNow: function() {
13
+ return isBrowserNow;
14
+ },
15
+ default: function() {
16
+ return _default;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _isUndefined = /*#__PURE__*/ _interop_require_default._(require("./isUndefined"));
21
+ const isBrowserNow = ()=>!(0, _isUndefined.default)(window);
22
+ const _default = isBrowserNow;
package/isBrowserNow.mjs CHANGED
@@ -2,6 +2,5 @@ import isUndefined from "./isUndefined";
2
2
  /**
3
3
  * @category ssr
4
4
  * @category is
5
- */
6
- export var isBrowserNow = function () { return !isUndefined(window); };
5
+ */ export const isBrowserNow = ()=>!isUndefined(window);
7
6
  export default isBrowserNow;
package/isDate.js CHANGED
@@ -1,15 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isDate = void 0;
4
- var tslib_1 = require("tslib");
5
- var getType_1 = tslib_1.__importDefault(require("./getType"));
6
- /**
7
- * Returns whether the payload is a Date, and that the date is valid
8
- *
9
- * @category is
10
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isDate: function() {
13
+ return isDate;
14
+ },
15
+ default: function() {
16
+ return _default;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
11
21
  function isDate(payload) {
12
- return (0, getType_1.default)(payload) === "Date" && !isNaN(payload);
22
+ return (0, _getType.default)(payload) === "Date" && !isNaN(payload);
13
23
  }
14
- exports.isDate = isDate;
15
- exports.default = isDate;
24
+ const _default = isDate;
package/isDate.mjs CHANGED
@@ -3,8 +3,7 @@ import getType from "./getType";
3
3
  * Returns whether the payload is a Date, and that the date is valid
4
4
  *
5
5
  * @category is
6
- */
7
- export function isDate(payload) {
6
+ */ export function isDate(payload) {
8
7
  return getType(payload) === "Date" && !isNaN(payload);
9
8
  }
10
9
  export default isDate;
package/isEmptyArray.js CHANGED
@@ -1,15 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEmptyArray = void 0;
4
- var tslib_1 = require("tslib");
5
- var isArray_1 = tslib_1.__importDefault(require("./isArray"));
6
- /**
7
- * Returns whether the payload is a an empty array
8
- *
9
- * @category is
10
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isEmptyArray: function() {
13
+ return isEmptyArray;
14
+ },
15
+ default: function() {
16
+ return _default;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _isArray = /*#__PURE__*/ _interop_require_default._(require("./isArray"));
11
21
  function isEmptyArray(payload) {
12
- return (0, isArray_1.default)(payload) && payload.length === 0;
22
+ return (0, _isArray.default)(payload) && payload.length === 0;
13
23
  }
14
- exports.isEmptyArray = isEmptyArray;
15
- exports.default = isEmptyArray;
24
+ const _default = isEmptyArray;
package/isEmptyArray.mjs CHANGED
@@ -3,8 +3,7 @@ import isArray from "./isArray";
3
3
  * Returns whether the payload is a an empty array
4
4
  *
5
5
  * @category is
6
- */
7
- export function isEmptyArray(payload) {
6
+ */ export function isEmptyArray(payload) {
8
7
  return isArray(payload) && payload.length === 0;
9
8
  }
10
9
  export default isEmptyArray;
package/isEmptyObject.js CHANGED
@@ -1,15 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEmptyObject = void 0;
4
- var tslib_1 = require("tslib");
5
- var isPlainObject_1 = tslib_1.__importDefault(require("./isPlainObject"));
6
- /**
7
- * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
8
- *
9
- * @category is
10
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isEmptyObject: function() {
13
+ return isEmptyObject;
14
+ },
15
+ default: function() {
16
+ return _default;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _isPlainObject = /*#__PURE__*/ _interop_require_default._(require("./isPlainObject"));
11
21
  function isEmptyObject(payload) {
12
- return (0, isPlainObject_1.default)(payload) && Object.keys(payload).length === 0;
22
+ return (0, _isPlainObject.default)(payload) && Object.keys(payload).length === 0;
13
23
  }
14
- exports.isEmptyObject = isEmptyObject;
15
- exports.default = isEmptyObject;
24
+ const _default = isEmptyObject;
package/isEmptyObject.mjs CHANGED
@@ -3,8 +3,7 @@ import isPlainObject from "./isPlainObject";
3
3
  * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
4
4
  *
5
5
  * @category is
6
- */
7
- export function isEmptyObject(payload) {
6
+ */ export function isEmptyObject(payload) {
8
7
  return isPlainObject(payload) && Object.keys(payload).length === 0;
9
8
  }
10
9
  export default isEmptyObject;
package/isEmptyString.js CHANGED
@@ -1,13 +1,26 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEmptyString = void 0;
4
1
  /**
5
2
  * Returns whether the payload is ''
6
3
  *
7
4
  * @category is
8
- */
5
+ */ "use strict";
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ function _export(target, all) {
10
+ for(var name in all)Object.defineProperty(target, name, {
11
+ enumerable: true,
12
+ get: all[name]
13
+ });
14
+ }
15
+ _export(exports, {
16
+ isEmptyString: function() {
17
+ return isEmptyString;
18
+ },
19
+ default: function() {
20
+ return _default;
21
+ }
22
+ });
9
23
  function isEmptyString(payload) {
10
24
  return payload === "";
11
25
  }
12
- exports.isEmptyString = isEmptyString;
13
- exports.default = isEmptyString;
26
+ const _default = isEmptyString;
package/isEmptyString.mjs CHANGED
@@ -2,8 +2,7 @@
2
2
  * Returns whether the payload is ''
3
3
  *
4
4
  * @category is
5
- */
6
- export function isEmptyString(payload) {
5
+ */ export function isEmptyString(payload) {
7
6
  return payload === "";
8
7
  }
9
8
  export default isEmptyString;
package/isError.js CHANGED
@@ -1,15 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isError = void 0;
4
- var tslib_1 = require("tslib");
5
- var getType_1 = tslib_1.__importDefault(require("./getType"));
6
- /**
7
- * Returns whether the payload is an Error
8
- *
9
- * @category is
10
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isError: function() {
13
+ return isError;
14
+ },
15
+ default: function() {
16
+ return _default;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
11
21
  function isError(payload) {
12
- return (0, getType_1.default)(payload) === "Error";
22
+ return (0, _getType.default)(payload) === "Error";
13
23
  }
14
- exports.isError = isError;
15
- exports.default = isError;
24
+ const _default = isError;
package/isError.mjs CHANGED
@@ -3,8 +3,7 @@ import getType from "./getType";
3
3
  * Returns whether the payload is an Error
4
4
  *
5
5
  * @category is
6
- */
7
- export function isError(payload) {
6
+ */ export function isError(payload) {
8
7
  return getType(payload) === "Error";
9
8
  }
10
9
  export default isError;