rambda 9.2.1 → 9.4.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/CHANGELOG.md +16 -0
- package/README.md +177 -130
- package/dist/rambda.js +6 -20
- package/dist/rambda.umd.js +1 -1
- package/immutable.d.ts +42 -36
- package/index.d.ts +42 -36
- package/package.json +15 -24
- package/rambda.js +1 -1
- package/src/forEachObjIndexed.js +0 -1
- package/src/ifElse.js +2 -3
- package/src/insertAll.js +1 -1
- package/src/isEmpty.js +0 -7
- package/src/isNotEmpty.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rambda",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"before": "yarn out && yarn docs",
|
|
6
6
|
"benchmark": "cd ../rambda-scripts && RAMBDA_RUN_ALL=ON RAMBDA_RUN_INDEXES=ON yarn benchmark",
|
|
@@ -11,28 +11,20 @@
|
|
|
11
11
|
"build:main": "cross-env NODE_ENV=build rollup -c files/rollup.config.mjs",
|
|
12
12
|
"build:step": "yarn populatereadme && yarn build:main",
|
|
13
13
|
"build:web": "cross-env NODE_ENV=build rollup -c files/rollup.web.config.mjs",
|
|
14
|
-
"d": "yarn out &&
|
|
14
|
+
"d": "yarn out && run d",
|
|
15
15
|
"docs": "npx docsify-cli init ./docs && yarn fix-docsify",
|
|
16
16
|
"fix-docsify": "cd ../rambda-scripts && yarn fix-docsify:rambda",
|
|
17
|
-
"git:add": "git add -A",
|
|
18
|
-
"github": "cd ../rambda-scripts && yarn github",
|
|
19
17
|
"immutable": "cd ../rambda-scripts && yarn immutable:rambda",
|
|
20
18
|
"immutable:x": "cd ../rambda-scripts && yarn immutable:rambdax",
|
|
21
|
-
"lint": "yarn git:add && yarn lint:staged && yarn git:add",
|
|
22
|
-
"lint:all": "cd ../rambda-scripts && yarn lint",
|
|
23
|
-
"lint:staged": "cd ../rambda-scripts && yarn lint:staged",
|
|
24
|
-
"new": "cd ../rambda-scripts && yarn new",
|
|
25
19
|
"out": "yarn populatedocs && yarn populatereadme && yarn immutable && yarn build",
|
|
26
20
|
"populatedocs": "cd ../rambda-scripts && yarn populate:docs",
|
|
27
21
|
"populatedocs:x": "cd ../rambda-scripts && yarn populate:docs:rambdax",
|
|
28
22
|
"populatereadme": "cd ../rambda-scripts && yarn populate:readme",
|
|
29
23
|
"populatereadme:x": "cd ../rambda-scripts && yarn populate:readme:rambdax",
|
|
30
|
-
"run:ramda:test": "cd ../rambda-scripts && yarn run:ramda:test",
|
|
31
24
|
"test": "jest -o -u --watch",
|
|
32
25
|
"test:all": "jest source/*.spec.js -u --bail=false",
|
|
33
26
|
"test:ci": "jest source/*.spec.js --coverage --no-cache -w 1",
|
|
34
27
|
"test:typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source",
|
|
35
|
-
"test:ts": "yarn test:typings",
|
|
36
28
|
"ts": "yarn test:typings",
|
|
37
29
|
"usedby": "cd ../rambda-scripts && yarn usedby",
|
|
38
30
|
"x": "yarn populatedocs:x && yarn populatereadme:x && yarn immutable:x"
|
|
@@ -42,31 +34,31 @@
|
|
|
42
34
|
],
|
|
43
35
|
"dependencies": {},
|
|
44
36
|
"devDependencies": {
|
|
45
|
-
"@babel/core": "7.
|
|
37
|
+
"@babel/core": "7.25.8",
|
|
46
38
|
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
|
|
47
|
-
"@babel/preset-env": "7.
|
|
39
|
+
"@babel/preset-env": "7.25.8",
|
|
48
40
|
"@definitelytyped/dtslint": "0.0.182",
|
|
49
41
|
"@rollup/plugin-babel": "6.0.4",
|
|
50
|
-
"@rollup/plugin-commonjs": "
|
|
51
|
-
"@rollup/plugin-node-resolve": "15.
|
|
52
|
-
"@rollup/plugin-replace": "
|
|
53
|
-
"@types/jest": "29.5.
|
|
42
|
+
"@rollup/plugin-commonjs": "28.0.0",
|
|
43
|
+
"@rollup/plugin-node-resolve": "15.3.0",
|
|
44
|
+
"@rollup/plugin-replace": "6.0.1",
|
|
45
|
+
"@types/jest": "29.5.13",
|
|
54
46
|
"combinate": "1.1.11",
|
|
55
47
|
"cross-env": "7.0.3",
|
|
56
|
-
"fast-check": "3.
|
|
57
|
-
"helpers-fn": "
|
|
48
|
+
"fast-check": "3.22.0",
|
|
49
|
+
"helpers-fn": "2.0.0",
|
|
58
50
|
"is-ci": "3.0.1",
|
|
59
51
|
"jest": "29.7.0",
|
|
60
52
|
"jest-extended": "4.0.2",
|
|
61
53
|
"lodash": "4.17.21",
|
|
62
|
-
"rambdax": "11.
|
|
63
|
-
"ramda": "0.30.
|
|
64
|
-
"rollup": "4.
|
|
54
|
+
"rambdax": "11.2.0",
|
|
55
|
+
"ramda": "0.30.1",
|
|
56
|
+
"rollup": "4.24.0",
|
|
65
57
|
"rollup-plugin-cleanup": "3.2.1",
|
|
66
58
|
"rollup-plugin-sourcemaps": "0.6.3",
|
|
67
59
|
"rollup-plugin-uglify": "6.0.4",
|
|
68
|
-
"types-ramda": "0.30.
|
|
69
|
-
"typescript": "5.
|
|
60
|
+
"types-ramda": "0.30.1",
|
|
61
|
+
"typescript": "5.6.3"
|
|
70
62
|
},
|
|
71
63
|
"jest": {
|
|
72
64
|
"testEnvironment": "node",
|
|
@@ -98,7 +90,6 @@
|
|
|
98
90
|
"files": [
|
|
99
91
|
"dist",
|
|
100
92
|
"src",
|
|
101
|
-
"README.md",
|
|
102
93
|
"CHANGELOG.md",
|
|
103
94
|
"index.d.ts",
|
|
104
95
|
"immutable.d.ts",
|
package/rambda.js
CHANGED
|
@@ -95,6 +95,7 @@ export * from './src/intersperse.js'
|
|
|
95
95
|
export * from './src/is.js'
|
|
96
96
|
export * from './src/isEmpty.js'
|
|
97
97
|
export * from './src/isNil.js'
|
|
98
|
+
export * from './src/isNotEmpty.js'
|
|
98
99
|
export * from './src/isNotNil.js'
|
|
99
100
|
export * from './src/join.js'
|
|
100
101
|
export * from './src/juxt.js'
|
|
@@ -219,4 +220,3 @@ export * from './src/xor.js'
|
|
|
219
220
|
export * from './src/zip.js'
|
|
220
221
|
export * from './src/zipObj.js'
|
|
221
222
|
export * from './src/zipWith.js'
|
|
222
|
-
|
package/src/forEachObjIndexed.js
CHANGED
package/src/ifElse.js
CHANGED
|
@@ -4,10 +4,9 @@ function ifElseFn(
|
|
|
4
4
|
condition, onTrue, onFalse
|
|
5
5
|
){
|
|
6
6
|
return (...input) => {
|
|
7
|
-
|
|
7
|
+
const conditionResult =
|
|
8
8
|
typeof condition === 'boolean' ? condition : condition(...input)
|
|
9
|
-
|
|
10
|
-
if (conditionResult === true){
|
|
9
|
+
if (Boolean(conditionResult) ){
|
|
11
10
|
return onTrue(...input)
|
|
12
11
|
}
|
|
13
12
|
|
package/src/insertAll.js
CHANGED
package/src/isEmpty.js
CHANGED
|
@@ -6,13 +6,6 @@ export function isEmpty(input){
|
|
|
6
6
|
return false
|
|
7
7
|
if (!input) return true
|
|
8
8
|
|
|
9
|
-
if (type(input.isEmpty) === 'Function') {
|
|
10
|
-
return input.isEmpty();
|
|
11
|
-
} else if (input.isEmpty) {
|
|
12
|
-
return !!input.isEmpty;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
9
|
if (inputType === 'Object'){
|
|
17
10
|
return Object.keys(input).length === 0
|
|
18
11
|
}
|