@helpers4/object 2.0.0-alpha.9 → 2.0.0-beta.0
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 +11 -5
- package/lib/index.d.ts +92 -11
- package/lib/index.js +227 -45
- package/lib/index.js.map +1 -1
- package/llms.txt +577 -0
- package/meta/api.json +400 -37
- package/meta/category.json +6 -0
- package/meta/examples.json +69 -4
- package/meta/licenses.json +1 -8
- package/meta/native-alternatives.json +50 -0
- package/package.json +9 -6
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "object",
|
|
3
|
+
"functions": [
|
|
4
|
+
{
|
|
5
|
+
"name": "keys / values",
|
|
6
|
+
"libraries": [
|
|
7
|
+
"lodash",
|
|
8
|
+
"radashi",
|
|
9
|
+
"ramda"
|
|
10
|
+
],
|
|
11
|
+
"native": "Object.keys() / Object.values()",
|
|
12
|
+
"since": "ES2017",
|
|
13
|
+
"example": "Object.keys(obj)\nObject.values(obj)",
|
|
14
|
+
"notes": "TypeScript types keys as string[]"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "toPairs / fromPairs",
|
|
18
|
+
"libraries": [
|
|
19
|
+
"lodash",
|
|
20
|
+
"ramda"
|
|
21
|
+
],
|
|
22
|
+
"native": "Object.entries() / Object.fromEntries()",
|
|
23
|
+
"since": "ES2019",
|
|
24
|
+
"example": "Object.entries(obj)\nObject.fromEntries(entries)"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "has",
|
|
28
|
+
"libraries": [
|
|
29
|
+
"lodash",
|
|
30
|
+
"ramda"
|
|
31
|
+
],
|
|
32
|
+
"native": "Object.hasOwn(obj, key)",
|
|
33
|
+
"since": "ES2022",
|
|
34
|
+
"example": "Object.hasOwn(obj, 'key')",
|
|
35
|
+
"notes": "Replaces obj.hasOwnProperty(key)"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "merge (shallow)",
|
|
39
|
+
"libraries": [
|
|
40
|
+
"lodash",
|
|
41
|
+
"radashi",
|
|
42
|
+
"ramda"
|
|
43
|
+
],
|
|
44
|
+
"native": "{ ...a, ...b } or Object.assign({}, a, b)",
|
|
45
|
+
"since": "ES2015",
|
|
46
|
+
"example": "const merged = { ...defaults, ...options }",
|
|
47
|
+
"notes": "For deep merge, use deepMerge from helpers4"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helpers4/object",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
4
|
"description": "A set of helpers in TS/JS, compatible with tree-shaking, for object.",
|
|
5
5
|
"author": "baxyz <baxy@etik.com>",
|
|
6
6
|
"license": "LGPL-3.0",
|
|
@@ -21,32 +21,35 @@
|
|
|
21
21
|
"./meta/api.json": "./meta/api.json",
|
|
22
22
|
"./meta/examples.json": "./meta/examples.json",
|
|
23
23
|
"./meta/licenses.json": "./meta/licenses.json",
|
|
24
|
+
"./llms.txt": "./llms.txt",
|
|
24
25
|
"./package.json": "./package.json"
|
|
25
26
|
},
|
|
26
27
|
"keywords": [
|
|
27
28
|
"helpers",
|
|
28
29
|
"object",
|
|
30
|
+
"compact",
|
|
29
31
|
"deepClone",
|
|
30
32
|
"deepCompare",
|
|
31
33
|
"deepMerge",
|
|
32
34
|
"get",
|
|
33
|
-
"
|
|
35
|
+
"omit",
|
|
36
|
+
"pick",
|
|
34
37
|
"removeUndefinedNull",
|
|
35
|
-
"
|
|
38
|
+
"safeJsonParse",
|
|
39
|
+
"set",
|
|
40
|
+
"shallowEquals"
|
|
36
41
|
],
|
|
37
42
|
"files": [
|
|
38
43
|
"lib/index.js",
|
|
39
44
|
"lib/index.d.ts",
|
|
40
45
|
"lib/index.js.map",
|
|
41
46
|
"meta/",
|
|
47
|
+
"llms.txt",
|
|
42
48
|
"LICENSE.md",
|
|
43
49
|
"package.json",
|
|
44
50
|
"README.md"
|
|
45
51
|
],
|
|
46
52
|
"engines": {
|
|
47
53
|
"node": ">=18.0.0"
|
|
48
|
-
},
|
|
49
|
-
"peerDependencies": {
|
|
50
|
-
"radashi": "^12.7.2"
|
|
51
54
|
}
|
|
52
55
|
}
|