@koine/utils 1.0.35 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @file
3
3
  *
4
- * TODO: libraries to encapsulate and re-export from here,
5
- * the selection is based on:
4
+ * Libraries to encapsulate and re-export from here, the selection is based on:
6
5
  *
7
6
  * [x] full typescript support
8
7
  * [x] treeshake-ability
@@ -24,6 +23,14 @@
24
23
  *
25
24
  * About utilities useful examples @see:
26
25
  * - https://github.com/chakra-ui/chakra-ui/blob/main/packages/utils/src
26
+ *
27
+ * TODO:
28
+ * We could also re-exports direct dependencies of packages that we often use
29
+ * anyway like [those of `yup`](https://github.com/jquense/yup/blob/master/package.json#L103):
30
+ *
31
+ * - [tiny-case](https://github.com/jquense/tiny-case)
32
+ * - [property-expr](https://github.com/jquense/expr/blob/master/index.js)
33
+ * - [toposort](https://github.com/marcelklehr/toposort)
27
34
  */
28
35
  export * from "./accentSets";
29
36
  export * from "./addOrReplaceAtIdx";
@@ -36,6 +43,7 @@ export * from "./clamp";
36
43
  export * from "./clsx";
37
44
  export * from "./convertRange";
38
45
  export * from "./cookie";
46
+ export * from "./createStorage";
39
47
  export * from "./decode";
40
48
  export * from "./Defer";
41
49
  export * from "./Emitter";
package/index.js CHANGED
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @file
3
3
  *
4
- * TODO: libraries to encapsulate and re-export from here,
5
- * the selection is based on:
4
+ * Libraries to encapsulate and re-export from here, the selection is based on:
6
5
  *
7
6
  * [x] full typescript support
8
7
  * [x] treeshake-ability
@@ -24,6 +23,14 @@
24
23
  *
25
24
  * About utilities useful examples @see:
26
25
  * - https://github.com/chakra-ui/chakra-ui/blob/main/packages/utils/src
26
+ *
27
+ * TODO:
28
+ * We could also re-exports direct dependencies of packages that we often use
29
+ * anyway like [those of `yup`](https://github.com/jquense/yup/blob/master/package.json#L103):
30
+ *
31
+ * - [tiny-case](https://github.com/jquense/tiny-case)
32
+ * - [property-expr](https://github.com/jquense/expr/blob/master/index.js)
33
+ * - [toposort](https://github.com/marcelklehr/toposort)
27
34
  */
28
35
  export * from "./accentSets";
29
36
  export * from "./addOrReplaceAtIdx";
@@ -36,6 +43,7 @@ export * from "./clamp";
36
43
  export * from "./clsx";
37
44
  export * from "./convertRange";
38
45
  export * from "./cookie";
46
+ export * from "./createStorage";
39
47
  export * from "./decode";
40
48
  export * from "./Defer";
41
49
  export * from "./Emitter";
package/node/index.js CHANGED
@@ -2,8 +2,7 @@
2
2
  /**
3
3
  * @file
4
4
  *
5
- * TODO: libraries to encapsulate and re-export from here,
6
- * the selection is based on:
5
+ * Libraries to encapsulate and re-export from here, the selection is based on:
7
6
  *
8
7
  * [x] full typescript support
9
8
  * [x] treeshake-ability
@@ -25,6 +24,14 @@
25
24
  *
26
25
  * About utilities useful examples @see:
27
26
  * - https://github.com/chakra-ui/chakra-ui/blob/main/packages/utils/src
27
+ *
28
+ * TODO:
29
+ * We could also re-exports direct dependencies of packages that we often use
30
+ * anyway like [those of `yup`](https://github.com/jquense/yup/blob/master/package.json#L103):
31
+ *
32
+ * - [tiny-case](https://github.com/jquense/tiny-case)
33
+ * - [property-expr](https://github.com/jquense/expr/blob/master/index.js)
34
+ * - [toposort](https://github.com/marcelklehr/toposort)
28
35
  */
29
36
  Object.defineProperty(exports, "__esModule", { value: true });
30
37
  var tslib_1 = require("tslib");
@@ -39,6 +46,7 @@ tslib_1.__exportStar(require("./clamp"), exports);
39
46
  tslib_1.__exportStar(require("./clsx"), exports);
40
47
  tslib_1.__exportStar(require("./convertRange"), exports);
41
48
  tslib_1.__exportStar(require("./cookie"), exports);
49
+ tslib_1.__exportStar(require("./createStorage"), exports);
42
50
  tslib_1.__exportStar(require("./decode"), exports);
43
51
  tslib_1.__exportStar(require("./Defer"), exports);
44
52
  tslib_1.__exportStar(require("./Emitter"), exports);
package/node/setCookie.js CHANGED
@@ -23,7 +23,7 @@ function setCookie(name, value, attributes) {
23
23
  if (process.env["NODE_ENV"] !== "production") {
24
24
  console.warn("[@koine/utils] cookie setCookie: document is undefined");
25
25
  }
26
- return;
26
+ return undefined;
27
27
  }
28
28
  if ((0, isNumber_1.default)(expires)) {
29
29
  expires = new Date(Date.now() + expires * 864e5);
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "peerDependencies": {
8
8
  "tslib": "^2.4.0"
9
9
  },
10
- "version": "1.0.35",
10
+ "version": "1.0.38",
11
11
  "module": "./index.js",
12
12
  "types": "./index.d.ts"
13
13
  }
package/setCookie.js CHANGED
@@ -20,7 +20,7 @@ export function setCookie(name, value, attributes) {
20
20
  if (process.env["NODE_ENV"] !== "production") {
21
21
  console.warn("[@koine/utils] cookie setCookie: document is undefined");
22
22
  }
23
- return;
23
+ return undefined;
24
24
  }
25
25
  if (isNumber(expires)) {
26
26
  expires = new Date(Date.now() + expires * 864e5);