@koine/utils 1.0.56 → 1.0.59
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/README.md +34 -0
- package/index.d.ts +0 -34
- package/index.js +0 -34
- package/node/index.js +0 -34
- package/package.json +1 -1
- package/whitelistObject.d.ts +0 -8
package/README.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @koine/utils
|
|
2
2
|
|
|
3
|
+
Libraries to encapsulate and re-export from here, the selection is based on:
|
|
4
|
+
|
|
5
|
+
- [x] full typescript support
|
|
6
|
+
- [x] treeshake-ability
|
|
7
|
+
- [x] docs in source comments
|
|
8
|
+
|
|
9
|
+
- [mesqueeb/merge-anything](https://github.com/mesqueeb/merge-anything)
|
|
10
|
+
- [mesqueeb/filter-anything](https://github.com/mesqueeb/filter-anything)
|
|
11
|
+
- [mesqueeb/case-anything](https://github.com/mesqueeb/case-anything)
|
|
12
|
+
- [mesqueeb/nestify-anything](https://github.com/mesqueeb/nestify-anything)
|
|
13
|
+
- [mesqueeb/fast-sort (fork)](https://github.com/mesqueeb/fast-sort (fork))
|
|
14
|
+
- [mesqueeb/compare-anything](https://github.com/mesqueeb/compare-anything)
|
|
15
|
+
- [mesqueeb/copy-anything](https://github.com/mesqueeb/copy-anything)
|
|
16
|
+
- [mesqueeb/flatten-anything](https://github.com/mesqueeb/flatten-anything)
|
|
17
|
+
|
|
18
|
+
About ts utilities types @see:
|
|
19
|
+
|
|
20
|
+
- [sindresorhus/type-fest](https://github.com/sindresorhus/type-fest)
|
|
21
|
+
- [millsp/ts-toolbelt](https://github.com/millsp/ts-toolbelt)
|
|
22
|
+
- [ts-essentials](https://github.com/ts-essentials/ts-essentials)
|
|
23
|
+
|
|
24
|
+
For inspiration look at [1loc.dev](https://1loc.dev).
|
|
25
|
+
|
|
26
|
+
About utilities useful examples @see:
|
|
27
|
+
|
|
28
|
+
- [chakra-ui](https://github.com/chakra-ui/chakra-ui/blob/main/packages/utils/src)
|
|
29
|
+
|
|
30
|
+
TODO: We could also re-exports direct dependencies of packages that we often use
|
|
31
|
+
anyway like [those of `yup`](https://github.com/jquense/yup/blob/master/package.json#L103):
|
|
32
|
+
|
|
33
|
+
- [tiny-case](https://github.com/jquense/tiny-case)
|
|
34
|
+
- [property-expr](https://github.com/jquense/expr/blob/master/index.js)
|
|
35
|
+
- [toposort](https://github.com/marcelklehr/toposort)
|
|
36
|
+
|
|
3
37
|
## Code
|
|
4
38
|
|
|
5
39
|
- Transformative functions like `truncate` or `titleCase` should allow for nullable inputs as much as possible, acceptin both `undefined` and `null`.
|
package/index.d.ts
CHANGED
|
@@ -1,37 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file
|
|
3
|
-
*
|
|
4
|
-
* Libraries to encapsulate and re-export from here, the selection is based on:
|
|
5
|
-
*
|
|
6
|
-
* [x] full typescript support
|
|
7
|
-
* [x] treeshake-ability
|
|
8
|
-
* [x] docs in source comments
|
|
9
|
-
*
|
|
10
|
-
* - https://github.com/mesqueeb/merge-anything
|
|
11
|
-
* - https://github.com/mesqueeb/filter-anything
|
|
12
|
-
* - https://github.com/mesqueeb/case-anything
|
|
13
|
-
* - https://github.com/mesqueeb/nestify-anything
|
|
14
|
-
* - https://github.com/mesqueeb/fast-sort (fork)
|
|
15
|
-
* - https://github.com/mesqueeb/compare-anything
|
|
16
|
-
* - https://github.com/mesqueeb/copy-anything
|
|
17
|
-
* - https://github.com/mesqueeb/flatten-anything
|
|
18
|
-
|
|
19
|
-
* About ts utilities types @see:
|
|
20
|
-
* - https://github.com/sindresorhus/type-fest
|
|
21
|
-
* - https://github.com/millsp/ts-toolbelt
|
|
22
|
-
* - https://github.com/ts-essentials/ts-essentials
|
|
23
|
-
*
|
|
24
|
-
* About utilities useful examples @see:
|
|
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)
|
|
34
|
-
*/
|
|
35
1
|
export * from "./accentSets";
|
|
36
2
|
export * from "./addOrReplaceAtIdx";
|
|
37
3
|
export * from "./arrayToLookup";
|
package/index.js
CHANGED
|
@@ -1,37 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file
|
|
3
|
-
*
|
|
4
|
-
* Libraries to encapsulate and re-export from here, the selection is based on:
|
|
5
|
-
*
|
|
6
|
-
* [x] full typescript support
|
|
7
|
-
* [x] treeshake-ability
|
|
8
|
-
* [x] docs in source comments
|
|
9
|
-
*
|
|
10
|
-
* - https://github.com/mesqueeb/merge-anything
|
|
11
|
-
* - https://github.com/mesqueeb/filter-anything
|
|
12
|
-
* - https://github.com/mesqueeb/case-anything
|
|
13
|
-
* - https://github.com/mesqueeb/nestify-anything
|
|
14
|
-
* - https://github.com/mesqueeb/fast-sort (fork)
|
|
15
|
-
* - https://github.com/mesqueeb/compare-anything
|
|
16
|
-
* - https://github.com/mesqueeb/copy-anything
|
|
17
|
-
* - https://github.com/mesqueeb/flatten-anything
|
|
18
|
-
|
|
19
|
-
* About ts utilities types @see:
|
|
20
|
-
* - https://github.com/sindresorhus/type-fest
|
|
21
|
-
* - https://github.com/millsp/ts-toolbelt
|
|
22
|
-
* - https://github.com/ts-essentials/ts-essentials
|
|
23
|
-
*
|
|
24
|
-
* About utilities useful examples @see:
|
|
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)
|
|
34
|
-
*/
|
|
35
1
|
export * from "./accentSets";
|
|
36
2
|
export * from "./addOrReplaceAtIdx";
|
|
37
3
|
export * from "./arrayToLookup";
|
package/node/index.js
CHANGED
|
@@ -1,38 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @file
|
|
4
|
-
*
|
|
5
|
-
* Libraries to encapsulate and re-export from here, the selection is based on:
|
|
6
|
-
*
|
|
7
|
-
* [x] full typescript support
|
|
8
|
-
* [x] treeshake-ability
|
|
9
|
-
* [x] docs in source comments
|
|
10
|
-
*
|
|
11
|
-
* - https://github.com/mesqueeb/merge-anything
|
|
12
|
-
* - https://github.com/mesqueeb/filter-anything
|
|
13
|
-
* - https://github.com/mesqueeb/case-anything
|
|
14
|
-
* - https://github.com/mesqueeb/nestify-anything
|
|
15
|
-
* - https://github.com/mesqueeb/fast-sort (fork)
|
|
16
|
-
* - https://github.com/mesqueeb/compare-anything
|
|
17
|
-
* - https://github.com/mesqueeb/copy-anything
|
|
18
|
-
* - https://github.com/mesqueeb/flatten-anything
|
|
19
|
-
|
|
20
|
-
* About ts utilities types @see:
|
|
21
|
-
* - https://github.com/sindresorhus/type-fest
|
|
22
|
-
* - https://github.com/millsp/ts-toolbelt
|
|
23
|
-
* - https://github.com/ts-essentials/ts-essentials
|
|
24
|
-
*
|
|
25
|
-
* About utilities useful examples @see:
|
|
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)
|
|
35
|
-
*/
|
|
36
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
3
|
var tslib_1 = require("tslib");
|
|
38
4
|
tslib_1.__exportStar(require("./accentSets"), exports);
|
package/package.json
CHANGED
package/whitelistObject.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whitelist an object properties by selecting only the given keys, it returns a
|
|
3
|
-
* new object.
|
|
4
|
-
*
|
|
5
|
-
* @category objects
|
|
6
|
-
*/
|
|
7
|
-
export declare function whitelistObject<T extends object, Keys extends (keyof T)[]>(object: T, keys: Keys): Pick<T, Keys[number]>;
|
|
8
|
-
export default whitelistObject;
|