rambda 9.2.0 → 9.3.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/package.json CHANGED
@@ -1,110 +1,103 @@
1
1
  {
2
- "name": "rambda",
3
- "version": "9.2.0",
4
- "scripts": {
5
- "benchmark": "cd ../rambda-scripts && RAMBDA_RUN_ALL=ON RAMBDA_RUN_INDEXES=ON yarn benchmark",
6
- "benchmark:all": "yarn build:step && cd ../rambda-scripts && yarn benchmark:all",
7
- "benchmark:check": "yarn build:step && METHOD=compose yarn benchmark:check:apply",
8
- "benchmark:check:apply": "cd ../rambda-scripts && yarn check-benchmark",
9
- "build": "yarn build:main && yarn build:web",
10
- "build:main": "cross-env NODE_ENV=build rollup -c files/rollup.config.mjs",
11
- "build:step": "yarn populatereadme && yarn build:main",
12
- "build:web": "cross-env NODE_ENV=build rollup -c files/rollup.web.config.mjs",
13
- "d": "yarn out && yarn lint && run d",
14
- "docs": "npx docsify-cli init ./docs && yarn fix-docsify",
15
- "fix-docsify": "cd ../rambda-scripts && yarn fix-docsify:rambda",
16
- "git:add": "git add -A",
17
- "github": "cd ../rambda-scripts && yarn github",
18
- "immutable": "cd ../rambda-scripts && yarn immutable:rambda",
19
- "immutable:x": "cd ../rambda-scripts && yarn immutable:rambdax",
20
- "lint": "yarn git:add && yarn lint:staged && yarn git:add",
21
- "lint:all": "cd ../rambda-scripts && yarn lint",
22
- "lint:staged": "cd ../rambda-scripts && yarn lint:staged",
23
- "new": "cd ../rambda-scripts && yarn new",
24
- "out": "yarn populatedocs && yarn populatereadme && yarn immutable && yarn build",
25
- "before": "yarn out && yarn docs",
26
- "populatedocs": "cd ../rambda-scripts && yarn populate:docs",
27
- "populatedocs:x": "cd ../rambda-scripts && yarn populate:docs:rambdax",
28
- "populatereadme": "cd ../rambda-scripts && yarn populate:readme",
29
- "populatereadme:x": "cd ../rambda-scripts && yarn populate:readme:rambdax",
30
- "run:ramda:test": "cd ../rambda-scripts && yarn run:ramda:test",
31
- "test": "jest -o -u --watch",
32
- "test:all": "jest source/*.spec.js -u --bail=false",
33
- "test:ci": "jest source/*.spec.js --coverage --no-cache -w 1",
34
- "test:typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source",
35
- "test:ts": "yarn test:typings",
36
- "ts": "yarn test:typings",
37
- "usedby": "cd ../rambda-scripts && yarn usedby",
38
- "x": "yarn populatedocs:x && yarn populatereadme:x && yarn immutable:x"
39
- },
40
- "dependencies": {},
41
- "devDependencies": {
42
- "@babel/core": "7.23.3",
43
- "@babel/plugin-proposal-object-rest-spread": "7.20.7",
44
- "@babel/preset-env": "7.23.3",
45
- "@definitelytyped/dtslint": "0.0.176",
46
- "@rollup/plugin-babel": "6.0.4",
47
- "@rollup/plugin-commonjs": "25.0.7",
48
- "@rollup/plugin-node-resolve": "15.2.3",
49
- "@rollup/plugin-replace": "5.0.5",
50
- "@types/jest": "29.5.8",
51
- "combinate": "1.1.11",
52
- "cross-env": "7.0.3",
53
- "fast-check": "3.13.2",
54
- "helpers-fn": "1.8.1",
55
- "is-ci": "3.0.1",
56
- "jest": "29.7.0",
57
- "jest-extended": "4.0.2",
58
- "lodash": "4.17.21",
59
- "rambdax": "10.0.0",
60
- "ramda": "0.29.1",
61
- "rollup": "4.4.1",
62
- "rollup-plugin-cleanup": "3.2.1",
63
- "rollup-plugin-sourcemaps": "0.6.3",
64
- "rollup-plugin-uglify": "6.0.4",
65
- "types-ramda": "0.29.6",
66
- "typescript": "5.2.2"
67
- },
68
- "jest": {
69
- "testEnvironment": "node",
70
- "testRegex": ".*\\.(spec|test)\\.js$",
71
- "setupFilesAfterEnv": [
72
- "./files/testSetup.js"
73
- ],
74
- "collectCoverageFrom": [
75
- "source/*.js",
76
- "!_internals",
77
- "!benchmarks"
78
- ]
79
- },
80
- "repository": {
81
- "type": "git",
82
- "url": "git+https://github.com/selfrefactor/rambda.git"
83
- },
84
- "license": "MIT",
85
- "author": "self_refactor",
86
- "description": "Lightweight and faster alternative to Ramda with included TS definitions",
87
- "keywords": [
88
- "ramda",
89
- "fp",
90
- "functional",
91
- "utility",
92
- "lodash"
93
- ],
94
- "homepage": "https://github.com/selfrefactor/rambda#readme",
95
- "files": [
96
- "dist",
97
- "src",
98
- "README.md",
99
- "CHANGELOG.md",
100
- "index.d.ts",
101
- "immutable.d.ts",
102
- "rambda.js",
103
- "immutable.js"
104
- ],
105
- "sideEffects": false,
106
- "main": "./dist/rambda.js",
107
- "umd": "./dist/rambda.umd.js",
108
- "module": "./rambda.js",
109
- "types": "./index.d.ts"
2
+ "name": "rambda",
3
+ "version": "9.3.0",
4
+ "scripts": {
5
+ "before": "yarn out && yarn docs",
6
+ "benchmark": "cd ../rambda-scripts && RAMBDA_RUN_ALL=ON RAMBDA_RUN_INDEXES=ON yarn benchmark",
7
+ "benchmark:all": "yarn build:step && cd ../rambda-scripts && yarn benchmark:all",
8
+ "benchmark:check": "yarn build:step && METHOD=compose yarn benchmark:check:apply",
9
+ "benchmark:check:apply": "cd ../rambda-scripts && yarn check-benchmark",
10
+ "build": "yarn build:main && yarn build:web",
11
+ "build:main": "cross-env NODE_ENV=build rollup -c files/rollup.config.mjs",
12
+ "build:step": "yarn populatereadme && yarn build:main",
13
+ "build:web": "cross-env NODE_ENV=build rollup -c files/rollup.web.config.mjs",
14
+ "d": "yarn out && run d",
15
+ "docs": "npx docsify-cli init ./docs && yarn fix-docsify",
16
+ "fix-docsify": "cd ../rambda-scripts && yarn fix-docsify:rambda",
17
+ "immutable": "cd ../rambda-scripts && yarn immutable:rambda",
18
+ "immutable:x": "cd ../rambda-scripts && yarn immutable:rambdax",
19
+ "out": "yarn populatedocs && yarn populatereadme && yarn immutable && yarn build",
20
+ "populatedocs": "cd ../rambda-scripts && yarn populate:docs",
21
+ "populatedocs:x": "cd ../rambda-scripts && yarn populate:docs:rambdax",
22
+ "populatereadme": "cd ../rambda-scripts && yarn populate:readme",
23
+ "populatereadme:x": "cd ../rambda-scripts && yarn populate:readme:rambdax",
24
+ "test": "jest -o -u --watch",
25
+ "test:all": "jest source/*.spec.js -u --bail=false",
26
+ "test:ci": "jest source/*.spec.js --coverage --no-cache -w 1",
27
+ "test:typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source",
28
+ "usedby": "cd ../rambda-scripts && yarn usedby",
29
+ "x": "yarn populatedocs:x && yarn populatereadme:x && yarn immutable:x"
30
+ },
31
+ "depFn": [
32
+ "@definitelytyped/dtslint"
33
+ ],
34
+ "dependencies": {},
35
+ "devDependencies": {
36
+ "@babel/core": "7.24.7",
37
+ "@babel/plugin-proposal-object-rest-spread": "7.20.7",
38
+ "@babel/preset-env": "7.24.7",
39
+ "@definitelytyped/dtslint": "0.0.182",
40
+ "@rollup/plugin-babel": "6.0.4",
41
+ "@rollup/plugin-commonjs": "26.0.1",
42
+ "@rollup/plugin-node-resolve": "15.2.3",
43
+ "@rollup/plugin-replace": "5.0.7",
44
+ "@types/jest": "29.5.12",
45
+ "combinate": "1.1.11",
46
+ "cross-env": "7.0.3",
47
+ "fast-check": "3.19.0",
48
+ "helpers-fn": "1.8.1",
49
+ "is-ci": "3.0.1",
50
+ "jest": "29.7.0",
51
+ "jest-extended": "4.0.2",
52
+ "lodash": "4.17.21",
53
+ "rambdax": "11.1.1",
54
+ "ramda": "0.30.1",
55
+ "rollup": "4.18.0",
56
+ "rollup-plugin-cleanup": "3.2.1",
57
+ "rollup-plugin-sourcemaps": "0.6.3",
58
+ "rollup-plugin-uglify": "6.0.4",
59
+ "types-ramda": "0.30.1",
60
+ "typescript": "5.5.3"
61
+ },
62
+ "jest": {
63
+ "testEnvironment": "node",
64
+ "testRegex": ".*\\.(spec|test)\\.js$",
65
+ "setupFilesAfterEnv": [
66
+ "./files/testSetup.js"
67
+ ],
68
+ "collectCoverageFrom": [
69
+ "source/*.js",
70
+ "!_internals",
71
+ "!benchmarks"
72
+ ]
73
+ },
74
+ "repository": {
75
+ "type": "git",
76
+ "url": "git+https://github.com/selfrefactor/rambda.git"
77
+ },
78
+ "license": "MIT",
79
+ "author": "self_refactor",
80
+ "description": "Lightweight and faster alternative to Ramda with included TS definitions",
81
+ "keywords": [
82
+ "ramda",
83
+ "fp",
84
+ "functional",
85
+ "utility",
86
+ "lodash"
87
+ ],
88
+ "homepage": "https://github.com/selfrefactor/rambda#readme",
89
+ "files": [
90
+ "dist",
91
+ "src",
92
+ "CHANGELOG.md",
93
+ "index.d.ts",
94
+ "immutable.d.ts",
95
+ "rambda.js",
96
+ "immutable.js"
97
+ ],
98
+ "sideEffects": false,
99
+ "main": "./dist/rambda.js",
100
+ "umd": "./dist/rambda.umd.js",
101
+ "module": "./rambda.js",
102
+ "types": "./index.d.ts"
110
103
  }
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'
@@ -107,6 +108,7 @@ export * from './src/lensIndex.js'
107
108
  export * from './src/lensPath.js'
108
109
  export * from './src/lensProp.js'
109
110
  export * from './src/lt.js'
111
+ export * from './src/lte.js'
110
112
  export * from './src/map.js'
111
113
  export * from './src/match.js'
112
114
  export * from './src/mathMod.js'
@@ -18,7 +18,6 @@ export function forEachObjIndexedFn(fn, obj){
18
18
 
19
19
  export function forEachObjIndexed(fn, list){
20
20
  if (arguments.length === 1) return _list => forEachObjIndexed(fn, _list)
21
-
22
21
  if (list === undefined) return
23
22
 
24
23
  return forEachObjIndexedFn(fn, list)
package/src/hasIn.js CHANGED
@@ -1,9 +1,9 @@
1
- import { propFn } from "./prop";
1
+ import { propFn } from './prop.js';
2
2
 
3
3
  export function hasIn(searchProperty, obj) {
4
- if (arguments.length === 1){
5
- return (_obj) => hasIn(searchProperty, _obj);
6
- }
4
+ if (arguments.length === 1) {
5
+ return (_obj) => hasIn(searchProperty, _obj);
6
+ }
7
7
 
8
- return propFn(searchProperty, obj) !== undefined
9
- }
8
+ return propFn(searchProperty, obj) !== undefined;
9
+ }
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
  }
@@ -0,0 +1,5 @@
1
+ import { isEmpty } from './isEmpty.js';
2
+
3
+ export function isNotEmpty(input) {
4
+ return !isEmpty(input);
5
+ }
package/src/lte.js ADDED
@@ -0,0 +1,6 @@
1
+ export function lte(a, b){
2
+ if (arguments.length === 1)
3
+ return _b => lte(a, _b)
4
+
5
+ return a <= b
6
+ }