rambda 9.4.1 → 10.0.0-alpha.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.
Files changed (257) hide show
  1. package/CHANGELOG.md +84 -1
  2. package/README.md +4661 -13439
  3. package/dist/rambda.esm.js +1487 -0
  4. package/dist/rambda.js +952 -2113
  5. package/dist/rambda.umd.js +1595 -1
  6. package/immutable.d.ts +1060 -1295
  7. package/index.d.ts +1060 -1295
  8. package/package.json +95 -102
  9. package/rambda.js +10 -138
  10. package/src/_internals/baseSlice.js +5 -7
  11. package/src/_internals/createPath.js +4 -6
  12. package/src/_internals/includes.js +8 -4
  13. package/src/_internals/set.js +11 -11
  14. package/src/all.js +8 -6
  15. package/src/allPass.js +4 -4
  16. package/src/any.js +10 -10
  17. package/src/anyPass.js +4 -4
  18. package/src/append.js +4 -6
  19. package/src/checkObjectWithSpec.js +16 -0
  20. package/src/complement.js +1 -1
  21. package/src/concat.js +2 -4
  22. package/src/count.js +5 -4
  23. package/src/countBy.js +6 -7
  24. package/src/defaultTo.js +4 -6
  25. package/src/drop.js +4 -2
  26. package/src/dropLast.js +4 -8
  27. package/src/dropLastWhile.js +17 -26
  28. package/src/dropWhile.js +14 -22
  29. package/src/eqBy.js +3 -8
  30. package/src/eqProps.js +3 -8
  31. package/src/equals.js +99 -58
  32. package/src/evolve.js +19 -52
  33. package/src/excludes.js +5 -0
  34. package/src/filter.js +10 -40
  35. package/src/filterObject.js +13 -0
  36. package/src/find.js +6 -6
  37. package/src/findIndex.js +5 -5
  38. package/src/findLast.js +6 -6
  39. package/src/findLastIndex.js +5 -5
  40. package/src/flatMap.js +3 -0
  41. package/src/flatten.js +5 -5
  42. package/src/groupBy.js +9 -7
  43. package/src/head.js +5 -3
  44. package/src/includes.js +10 -7
  45. package/src/indexOf.js +2 -6
  46. package/src/init.js +6 -8
  47. package/src/innerJoin.js +11 -19
  48. package/src/intersection.js +2 -4
  49. package/src/intersperse.js +7 -7
  50. package/src/join.js +2 -4
  51. package/src/last.js +4 -4
  52. package/src/lastIndexOf.js +2 -6
  53. package/src/map.js +9 -49
  54. package/src/mapAsync.js +11 -0
  55. package/src/mapObject.js +18 -0
  56. package/src/mapObjectAsync.js +10 -0
  57. package/src/match.js +6 -6
  58. package/src/maxBy.js +2 -8
  59. package/src/merge.js +4 -1
  60. package/src/mergeTypes.js +3 -0
  61. package/src/minBy.js +2 -8
  62. package/src/modifyPath.js +22 -25
  63. package/src/none.js +8 -6
  64. package/src/objOf.js +2 -6
  65. package/src/omit.js +26 -11
  66. package/src/partition.js +20 -23
  67. package/src/path.js +14 -15
  68. package/src/pick.js +15 -15
  69. package/src/pipe.js +70 -13
  70. package/src/pipeAsync.js +10 -0
  71. package/src/pluck.js +7 -9
  72. package/src/prepend.js +2 -6
  73. package/src/prop.js +2 -10
  74. package/src/propEq.js +8 -10
  75. package/src/propOr.js +7 -8
  76. package/src/propSatisfies.js +2 -7
  77. package/src/range.js +3 -3
  78. package/src/reduce.js +15 -30
  79. package/src/reject.js +2 -4
  80. package/src/replace.js +2 -8
  81. package/src/replaceItemAtIndex.js +15 -0
  82. package/src/sort.js +2 -4
  83. package/src/sortBy.js +3 -3
  84. package/src/sortWith.js +9 -13
  85. package/src/split.js +2 -4
  86. package/src/splitEvery.js +6 -8
  87. package/src/symmetricDifference.js +5 -8
  88. package/src/tail.js +2 -2
  89. package/src/take.js +11 -9
  90. package/src/takeLast.js +14 -14
  91. package/src/takeLastWhile.js +19 -20
  92. package/src/takeWhile.js +12 -21
  93. package/src/tap.js +3 -3
  94. package/src/test.js +2 -8
  95. package/src/tryCatch.js +5 -14
  96. package/src/type.js +6 -5
  97. package/src/union.js +10 -8
  98. package/src/uniq.js +2 -2
  99. package/src/uniqBy.js +5 -6
  100. package/src/uniqWith.js +10 -14
  101. package/src/unless.js +7 -9
  102. package/src/unwind.js +6 -14
  103. package/src/update.js +8 -11
  104. package/src/when.js +7 -9
  105. package/src/zip.js +8 -8
  106. package/src/zipWith.js +5 -7
  107. package/src/F.js +0 -3
  108. package/src/T.js +0 -3
  109. package/src/_internals/_arity.js +0 -64
  110. package/src/_internals/compare.js +0 -3
  111. package/src/_internals/constants.js +0 -1
  112. package/src/_internals/createPathInput.js +0 -7
  113. package/src/_internals/isFalsy.js +0 -13
  114. package/src/_internals/isInteger.js +0 -10
  115. package/src/_internals/isIterable.js +0 -5
  116. package/src/_internals/isObject.js +0 -5
  117. package/src/_internals/isTruthy.js +0 -13
  118. package/src/_internals/objectIs.js +0 -9
  119. package/src/_internals/utils.js +0 -21
  120. package/src/add.js +0 -5
  121. package/src/addIndex.js +0 -23
  122. package/src/addIndexRight.js +0 -9
  123. package/src/adjust.js +0 -16
  124. package/src/always.js +0 -3
  125. package/src/and.js +0 -5
  126. package/src/ap.js +0 -7
  127. package/src/aperture.js +0 -15
  128. package/src/apply.js +0 -7
  129. package/src/applySpec.js +0 -132
  130. package/src/applyTo.js +0 -7
  131. package/src/ascend.js +0 -23
  132. package/src/assoc.js +0 -11
  133. package/src/assocPath.js +0 -46
  134. package/src/binary.js +0 -5
  135. package/src/bind.js +0 -9
  136. package/src/both.js +0 -5
  137. package/src/call.js +0 -1
  138. package/src/chain.js +0 -7
  139. package/src/clamp.js +0 -15
  140. package/src/clone.js +0 -18
  141. package/src/collectBy.js +0 -27
  142. package/src/comparator.js +0 -5
  143. package/src/compose.js +0 -9
  144. package/src/composeWith.js +0 -33
  145. package/src/cond.js +0 -14
  146. package/src/converge.js +0 -18
  147. package/src/curry.js +0 -7
  148. package/src/curryN.js +0 -40
  149. package/src/dec.js +0 -1
  150. package/src/descend.js +0 -17
  151. package/src/difference.js +0 -8
  152. package/src/differenceWith.js +0 -20
  153. package/src/dissoc.js +0 -13
  154. package/src/dissocPath.js +0 -47
  155. package/src/divide.js +0 -5
  156. package/src/dropRepeats.js +0 -20
  157. package/src/dropRepeatsBy.js +0 -21
  158. package/src/dropRepeatsWith.js +0 -28
  159. package/src/either.js +0 -8
  160. package/src/empty.js +0 -15
  161. package/src/endsWith.js +0 -23
  162. package/src/flip.js +0 -23
  163. package/src/forEach.js +0 -19
  164. package/src/forEachObjIndexed.js +0 -24
  165. package/src/fromPairs.js +0 -6
  166. package/src/groupWith.js +0 -46
  167. package/src/gt.js +0 -6
  168. package/src/gte.js +0 -6
  169. package/src/has.js +0 -7
  170. package/src/hasIn.js +0 -9
  171. package/src/hasPath.js +0 -9
  172. package/src/identical.js +0 -7
  173. package/src/identity.js +0 -3
  174. package/src/ifElse.js +0 -17
  175. package/src/inc.js +0 -1
  176. package/src/indexBy.js +0 -29
  177. package/src/insert.js +0 -11
  178. package/src/insertAll.js +0 -7
  179. package/src/is.js +0 -8
  180. package/src/isEmpty.js +0 -18
  181. package/src/isNil.js +0 -3
  182. package/src/isNotEmpty.js +0 -5
  183. package/src/isNotNil.js +0 -3
  184. package/src/isPromise.js +0 -5
  185. package/src/juxt.js +0 -3
  186. package/src/keys.js +0 -3
  187. package/src/length.js +0 -8
  188. package/src/lens.js +0 -7
  189. package/src/lensIndex.js +0 -7
  190. package/src/lensPath.js +0 -7
  191. package/src/lensProp.js +0 -7
  192. package/src/lt.js +0 -6
  193. package/src/lte.js +0 -6
  194. package/src/mathMod.js +0 -8
  195. package/src/max.js +0 -5
  196. package/src/maybe.js +0 -13
  197. package/src/mean.js +0 -5
  198. package/src/median.js +0 -17
  199. package/src/mergeAll.js +0 -11
  200. package/src/mergeDeepLeft.js +0 -5
  201. package/src/mergeDeepRight.js +0 -24
  202. package/src/mergeLeft.js +0 -7
  203. package/src/mergeRight.js +0 -8
  204. package/src/mergeWith.js +0 -25
  205. package/src/min.js +0 -5
  206. package/src/modify.js +0 -23
  207. package/src/modulo.js +0 -5
  208. package/src/move.js +0 -19
  209. package/src/multiply.js +0 -5
  210. package/src/negate.js +0 -3
  211. package/src/not.js +0 -3
  212. package/src/nth.js +0 -9
  213. package/src/of.js +0 -3
  214. package/src/on.js +0 -16
  215. package/src/once.js +0 -24
  216. package/src/or.js +0 -5
  217. package/src/over.js +0 -14
  218. package/src/partial.js +0 -17
  219. package/src/partialObject.js +0 -5
  220. package/src/pathEq.js +0 -11
  221. package/src/pathOr.js +0 -11
  222. package/src/pathSatisfies.js +0 -9
  223. package/src/paths.js +0 -9
  224. package/src/pickAll.js +0 -23
  225. package/src/pickBy.js +0 -11
  226. package/src/product.js +0 -4
  227. package/src/propIs.js +0 -10
  228. package/src/props.js +0 -13
  229. package/src/reduceBy.js +0 -29
  230. package/src/removeIndex.js +0 -7
  231. package/src/repeat.js +0 -7
  232. package/src/reverse.js +0 -9
  233. package/src/set.js +0 -9
  234. package/src/slice.js +0 -9
  235. package/src/splitAt.js +0 -21
  236. package/src/splitWhen.js +0 -25
  237. package/src/startsWith.js +0 -23
  238. package/src/subtract.js +0 -5
  239. package/src/sum.js +0 -3
  240. package/src/swap.js +0 -42
  241. package/src/times.js +0 -12
  242. package/src/toLower.js +0 -3
  243. package/src/toPairs.js +0 -3
  244. package/src/toString.js +0 -3
  245. package/src/toUpper.js +0 -3
  246. package/src/transpose.js +0 -10
  247. package/src/trim.js +0 -3
  248. package/src/unapply.js +0 -5
  249. package/src/unnest.js +0 -9
  250. package/src/values.js +0 -6
  251. package/src/view.js +0 -10
  252. package/src/where.js +0 -15
  253. package/src/whereAny.js +0 -12
  254. package/src/whereEq.js +0 -14
  255. package/src/without.js +0 -15
  256. package/src/xor.js +0 -5
  257. package/src/zipObj.js +0 -13
package/package.json CHANGED
@@ -1,104 +1,97 @@
1
1
  {
2
- "name": "rambda",
3
- "version": "9.4.1",
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
- "ts": "yarn test:typings",
29
- "usedby": "cd ../rambda-scripts && yarn usedby",
30
- "x": "yarn populatedocs:x && yarn populatereadme:x && yarn immutable:x"
31
- },
32
- "depFn": [
33
- "@definitelytyped/dtslint"
34
- ],
35
- "dependencies": {},
36
- "devDependencies": {
37
- "@babel/core": "7.26.0",
38
- "@babel/plugin-proposal-object-rest-spread": "7.20.7",
39
- "@babel/preset-env": "7.26.0",
40
- "@definitelytyped/dtslint": "0.0.182",
41
- "@rollup/plugin-babel": "6.0.4",
42
- "@rollup/plugin-commonjs": "28.0.1",
43
- "@rollup/plugin-node-resolve": "15.3.0",
44
- "@rollup/plugin-replace": "6.0.1",
45
- "@types/jest": "29.5.14",
46
- "combinate": "1.1.11",
47
- "cross-env": "7.0.3",
48
- "fast-check": "3.23.1",
49
- "helpers-fn": "2.0.0",
50
- "is-ci": "3.0.1",
51
- "jest": "29.7.0",
52
- "jest-extended": "4.0.2",
53
- "lodash": "4.17.21",
54
- "rambdax": "11.2.0",
55
- "ramda": "0.30.1",
56
- "rollup": "4.28.1",
57
- "rollup-plugin-cleanup": "3.2.1",
58
- "rollup-plugin-sourcemaps": "0.6.3",
59
- "rollup-plugin-uglify": "6.0.4",
60
- "types-ramda": "0.30.1",
61
- "typescript": "5.7.2"
62
- },
63
- "jest": {
64
- "testEnvironment": "node",
65
- "testRegex": ".*\\.(spec|test)\\.js$",
66
- "setupFilesAfterEnv": [
67
- "./files/testSetup.js"
68
- ],
69
- "collectCoverageFrom": [
70
- "source/*.js",
71
- "!_internals",
72
- "!benchmarks"
73
- ]
74
- },
75
- "repository": {
76
- "type": "git",
77
- "url": "git+https://github.com/selfrefactor/rambda.git"
78
- },
79
- "license": "MIT",
80
- "author": "self_refactor",
81
- "description": "Lightweight and faster alternative to Ramda with included TS definitions",
82
- "keywords": [
83
- "ramda",
84
- "fp",
85
- "functional",
86
- "utility",
87
- "lodash"
88
- ],
89
- "homepage": "https://github.com/selfrefactor/rambda#readme",
90
- "files": [
91
- "dist",
92
- "src",
93
- "CHANGELOG.md",
94
- "index.d.ts",
95
- "immutable.d.ts",
96
- "rambda.js",
97
- "immutable.js"
98
- ],
99
- "sideEffects": false,
100
- "main": "./dist/rambda.js",
101
- "umd": "./dist/rambda.umd.js",
102
- "module": "./rambda.js",
103
- "types": "./index.d.ts"
2
+ "name": "rambda",
3
+ "version": "10.0.0-alpha.0",
4
+ "scripts": {
5
+ "out": "yarn populatedocs && yarn populatereadme && yarn immutable && yarn build && yarn create-docsify",
6
+ "build": "yarn build:main && yarn build:web && yarn build:esm",
7
+ "build:main": "rollup rambda.js --file dist/rambda.js --format cjs",
8
+ "build:esm": "rollup rambda.js --file dist/rambda.esm.js --format es",
9
+ "build:web": "rollup rambda.js --file dist/rambda.umd.js --format umd --name \"R\"",
10
+ "immutable": "cd ../rambda-scripts && yarn immutable:rambda",
11
+ "populatedocs": "cd ../rambda-scripts && yarn populate:docs",
12
+ "populatereadme": "cd ../rambda-scripts && yarn populate:readme",
13
+ "lint": "cd source && run lint:folder > lint-output.txt",
14
+ "test:file": "node scripts/tasks/run/run-test.js",
15
+ "test:ci": "vitest run",
16
+ "test": "vitest run --watch -u",
17
+ "x": "vitest run --watch source/and.spec.js",
18
+ "test:cover": "vitest run --coverage",
19
+ "test:typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source",
20
+ "create-docsify": "cd ../rambda-scripts && yarn create-docsify",
21
+ "deps": "run dep:next",
22
+ "ts": "yarn test:typings"
23
+ },
24
+ "niketaScripts": {
25
+ "**/*.js": "yarn test:file"
26
+ },
27
+ "depFn": [
28
+ "@definitelytyped/dtslint"
29
+ ],
30
+ "dependencies": {},
31
+ "devDependencies": {
32
+ "@definitelytyped/dtslint": "0.0.182",
33
+ "@types/mocha": "10.0.10",
34
+ "@vitest/coverage-v8": "^3.0.5",
35
+ "helpers-fn": "2.0.0",
36
+ "lodash": "4.17.21",
37
+ "rambdax": "11.3.1",
38
+ "ramda": "0.30.1",
39
+ "remeda": "^2.21.0",
40
+ "rollup": "4.34.4",
41
+ "types-ramda": "0.30.1",
42
+ "typescript": "5.8.0-dev.20250206",
43
+ "vitest": "3.0.5"
44
+ },
45
+ "jest": {
46
+ "testEnvironment": "node",
47
+ "testRegex": ".*\\.(spec|test)\\.js$",
48
+ "setupFilesAfterEnv": [
49
+ "./files/testSetup.js"
50
+ ],
51
+ "collectCoverageFrom": [
52
+ "source/*.js",
53
+ "!_internals",
54
+ "!benchmarks"
55
+ ]
56
+ },
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "git+https://github.com/selfrefactor/rambda.git"
60
+ },
61
+ "license": "MIT",
62
+ "author": "self_refactor",
63
+ "description": "Lightweight and faster alternative to Ramda with included TS definitions",
64
+ "keywords": [
65
+ "curried",
66
+ "fp",
67
+ "functional",
68
+ "generics",
69
+ "lodash",
70
+ "ramda",
71
+ "stdlib",
72
+ "toolkit",
73
+ "ts",
74
+ "types",
75
+ "typescript",
76
+ "underscore",
77
+ "util",
78
+ "utilities",
79
+ "utility",
80
+ "utils"
81
+ ],
82
+ "homepage": "https://github.com/selfrefactor/rambda#readme",
83
+ "files": [
84
+ "dist",
85
+ "src",
86
+ "CHANGELOG.md",
87
+ "index.d.ts",
88
+ "immutable.d.ts",
89
+ "rambda.js",
90
+ "immutable.js"
91
+ ],
92
+ "sideEffects": false,
93
+ "main": "./dist/rambda.js",
94
+ "umd": "./dist/rambda.umd.js",
95
+ "module": "./rambda.js",
96
+ "types": "./index.d.ts"
104
97
  }
package/rambda.js CHANGED
@@ -1,188 +1,77 @@
1
1
  /// <reference types="./index.d.ts" />
2
- export * from './src/F.js'
3
- export * from './src/T.js'
4
- export * from './src/add.js'
5
- export * from './src/addIndex.js'
6
- export * from './src/addIndexRight.js'
7
- export * from './src/adjust.js'
8
2
  export * from './src/all.js'
9
3
  export * from './src/allPass.js'
10
- export * from './src/always.js'
11
- export * from './src/and.js'
12
4
  export * from './src/any.js'
13
5
  export * from './src/anyPass.js'
14
- export * from './src/ap.js'
15
- export * from './src/aperture.js'
16
6
  export * from './src/append.js'
17
- export * from './src/apply.js'
18
- export * from './src/applySpec.js'
19
- export * from './src/applyTo.js'
20
- export * from './src/ascend.js'
21
- export * from './src/assoc.js'
22
- export * from './src/assocPath.js'
23
- export * from './src/binary.js'
24
- export * from './src/bind.js'
25
- export * from './src/both.js'
26
- export * from './src/call.js'
27
- export * from './src/chain.js'
28
- export * from './src/clamp.js'
29
- export * from './src/clone.js'
30
- export * from './src/collectBy.js'
31
- export * from './src/comparator.js'
7
+ export * from './src/checkObjectWithSpec.js'
32
8
  export * from './src/complement.js'
33
- export * from './src/compose.js'
34
- export * from './src/composeWith.js'
35
9
  export * from './src/concat.js'
36
- export * from './src/cond.js'
37
- export * from './src/converge.js'
38
10
  export * from './src/count.js'
39
11
  export * from './src/countBy.js'
40
- export * from './src/curry.js'
41
- export * from './src/curryN.js'
42
- export * from './src/dec.js'
43
12
  export * from './src/defaultTo.js'
44
- export * from './src/descend.js'
45
- export * from './src/difference.js'
46
- export * from './src/differenceWith.js'
47
- export * from './src/dissoc.js'
48
- export * from './src/dissocPath.js'
49
- export * from './src/divide.js'
50
13
  export * from './src/drop.js'
51
14
  export * from './src/dropLast.js'
52
15
  export * from './src/dropLastWhile.js'
53
- export * from './src/dropRepeats.js'
54
- export * from './src/dropRepeatsBy.js'
55
- export * from './src/dropRepeatsWith.js'
56
16
  export * from './src/dropWhile.js'
57
- export * from './src/either.js'
58
- export * from './src/empty.js'
59
- export * from './src/endsWith.js'
60
17
  export * from './src/eqBy.js'
61
18
  export * from './src/eqProps.js'
62
19
  export * from './src/equals.js'
63
20
  export * from './src/evolve.js'
21
+ export * from './src/excludes.js'
64
22
  export * from './src/filter.js'
23
+ export * from './src/filterObject.js'
65
24
  export * from './src/find.js'
66
25
  export * from './src/findIndex.js'
67
26
  export * from './src/findLast.js'
68
27
  export * from './src/findLastIndex.js'
28
+ export * from './src/flatMap.js'
69
29
  export * from './src/flatten.js'
70
- export * from './src/flip.js'
71
- export * from './src/forEach.js'
72
- export * from './src/forEachObjIndexed.js'
73
- export * from './src/fromPairs.js'
74
30
  export * from './src/groupBy.js'
75
- export * from './src/groupWith.js'
76
- export * from './src/gt.js'
77
- export * from './src/gte.js'
78
- export * from './src/has.js'
79
- export * from './src/hasIn.js'
80
- export * from './src/hasPath.js'
81
31
  export * from './src/head.js'
82
- export * from './src/identical.js'
83
- export * from './src/identity.js'
84
- export * from './src/ifElse.js'
85
- export * from './src/inc.js'
86
32
  export * from './src/includes.js'
87
- export * from './src/indexBy.js'
88
33
  export * from './src/indexOf.js'
89
34
  export * from './src/init.js'
90
35
  export * from './src/innerJoin.js'
91
- export * from './src/insert.js'
92
- export * from './src/insertAll.js'
93
36
  export * from './src/intersection.js'
94
37
  export * from './src/intersperse.js'
95
- export * from './src/is.js'
96
- export * from './src/isEmpty.js'
97
- export * from './src/isNil.js'
98
- export * from './src/isNotEmpty.js'
99
- export * from './src/isNotNil.js'
100
38
  export * from './src/join.js'
101
- export * from './src/juxt.js'
102
- export * from './src/keys.js'
103
39
  export * from './src/last.js'
104
40
  export * from './src/lastIndexOf.js'
105
- export * from './src/length.js'
106
- export * from './src/lens.js'
107
- export * from './src/lensIndex.js'
108
- export * from './src/lensPath.js'
109
- export * from './src/lensProp.js'
110
- export * from './src/lt.js'
111
- export * from './src/lte.js'
112
41
  export * from './src/map.js'
42
+ export * from './src/mapAsync.js'
43
+ export * from './src/mapObject.js'
44
+ export * from './src/mapObjectAsync.js'
113
45
  export * from './src/match.js'
114
- export * from './src/mathMod.js'
115
- export * from './src/max.js'
116
46
  export * from './src/maxBy.js'
117
- export * from './src/mean.js'
118
- export * from './src/median.js'
119
47
  export * from './src/merge.js'
120
- export * from './src/mergeAll.js'
121
- export * from './src/mergeDeepLeft.js'
122
- export * from './src/mergeDeepRight.js'
123
- export * from './src/mergeLeft.js'
124
- export * from './src/mergeRight.js'
125
- export * from './src/mergeWith.js'
126
- export * from './src/min.js'
48
+ export * from './src/mergeTypes.js'
127
49
  export * from './src/minBy.js'
128
- export * from './src/modify.js'
129
50
  export * from './src/modifyPath.js'
130
- export * from './src/modulo.js'
131
- export * from './src/move.js'
132
- export * from './src/multiply.js'
133
- export * from './src/negate.js'
134
51
  export * from './src/none.js'
135
- export * from './src/not.js'
136
- export * from './src/nth.js'
137
52
  export * from './src/objOf.js'
138
- export * from './src/of.js'
139
53
  export * from './src/omit.js'
140
- export * from './src/on.js'
141
- export * from './src/once.js'
142
- export * from './src/or.js'
143
- export * from './src/over.js'
144
- export * from './src/partial.js'
145
- export * from './src/partialObject.js'
146
54
  export * from './src/partition.js'
147
55
  export * from './src/path.js'
148
- export * from './src/pathEq.js'
149
- export * from './src/pathOr.js'
150
- export * from './src/pathSatisfies.js'
151
- export * from './src/paths.js'
152
56
  export * from './src/pick.js'
153
- export * from './src/pickAll.js'
154
- export * from './src/pickBy.js'
155
57
  export * from './src/pipe.js'
58
+ export * from './src/pipeAsync.js'
156
59
  export * from './src/pluck.js'
157
60
  export * from './src/prepend.js'
158
- export * from './src/product.js'
159
61
  export * from './src/prop.js'
160
62
  export * from './src/propEq.js'
161
- export * from './src/propIs.js'
162
63
  export * from './src/propOr.js'
163
64
  export * from './src/propSatisfies.js'
164
- export * from './src/props.js'
165
65
  export * from './src/range.js'
166
66
  export * from './src/reduce.js'
167
- export * from './src/reduceBy.js'
168
67
  export * from './src/reject.js'
169
- export * from './src/removeIndex.js'
170
- export * from './src/repeat.js'
171
68
  export * from './src/replace.js'
172
- export * from './src/reverse.js'
173
- export * from './src/set.js'
174
- export * from './src/slice.js'
69
+ export * from './src/replaceItemAtIndex.js'
175
70
  export * from './src/sort.js'
176
71
  export * from './src/sortBy.js'
177
72
  export * from './src/sortWith.js'
178
73
  export * from './src/split.js'
179
- export * from './src/splitAt.js'
180
74
  export * from './src/splitEvery.js'
181
- export * from './src/splitWhen.js'
182
- export * from './src/startsWith.js'
183
- export * from './src/subtract.js'
184
- export * from './src/sum.js'
185
- export * from './src/swap.js'
186
75
  export * from './src/symmetricDifference.js'
187
76
  export * from './src/tail.js'
188
77
  export * from './src/take.js'
@@ -191,32 +80,15 @@ export * from './src/takeLastWhile.js'
191
80
  export * from './src/takeWhile.js'
192
81
  export * from './src/tap.js'
193
82
  export * from './src/test.js'
194
- export * from './src/times.js'
195
- export * from './src/toLower.js'
196
- export * from './src/toPairs.js'
197
- export * from './src/toString.js'
198
- export * from './src/toUpper.js'
199
- export * from './src/transpose.js'
200
- export * from './src/trim.js'
201
83
  export * from './src/tryCatch.js'
202
84
  export * from './src/type.js'
203
- export * from './src/unapply.js'
204
85
  export * from './src/union.js'
205
86
  export * from './src/uniq.js'
206
87
  export * from './src/uniqBy.js'
207
88
  export * from './src/uniqWith.js'
208
89
  export * from './src/unless.js'
209
- export * from './src/unnest.js'
210
90
  export * from './src/unwind.js'
211
91
  export * from './src/update.js'
212
- export * from './src/values.js'
213
- export * from './src/view.js'
214
92
  export * from './src/when.js'
215
- export * from './src/where.js'
216
- export * from './src/whereAny.js'
217
- export * from './src/whereEq.js'
218
- export * from './src/without.js'
219
- export * from './src/xor.js'
220
93
  export * from './src/zip.js'
221
- export * from './src/zipObj.js'
222
94
  export * from './src/zipWith.js'
@@ -1,20 +1,18 @@
1
- export default function baseSlice(
2
- array, start, end
3
- ){
1
+ export function baseSlice(array, start, end) {
4
2
  let index = -1
5
3
  let { length } = array
6
4
 
7
5
  end = end > length ? length : end
8
- if (end < 0){
6
+ if (end < 0) {
9
7
  end += length
10
8
  }
11
- length = start > end ? 0 : end - start >>> 0
9
+ length = start > end ? 0 : (end - start) >>> 0
12
10
  start >>>= 0
13
11
 
14
12
  const result = Array(length)
15
13
 
16
- while (++index < length){
17
- result[ index ] = array[ index + start ]
14
+ while (++index < length) {
15
+ result[index] = array[index + start]
18
16
  }
19
17
 
20
18
  return result
@@ -1,7 +1,5 @@
1
- import { isInteger } from './isInteger.js'
2
-
3
- export function createPath(path, delimiter = '.'){
4
- return typeof path === 'string' ?
5
- path.split(delimiter).map(x => isInteger(x) ? Number(x) : x) :
6
- path
1
+ export function createPath(path, delimiter = '.') {
2
+ return typeof path === 'string'
3
+ ? path.split(delimiter).map(x => (Number.isInteger(Number(x)) ? Number(x) : x))
4
+ : path
7
5
  }
@@ -1,12 +1,16 @@
1
- import { compare } from './compare.js'
1
+ function compare(a, b) {
2
+ return String(a) === String(b)
3
+ }
2
4
 
3
- export function includes(a, list){
5
+ export function includes(a, list) {
4
6
  let index = -1
5
7
  const { length } = list
6
8
 
7
- while (++index < length)
8
- if (compare(list[ index ], a))
9
+ while (++index < length) {
10
+ if (compare(list[index], a)) {
9
11
  return true
12
+ }
13
+ }
10
14
 
11
15
  return false
12
16
  }
@@ -1,37 +1,37 @@
1
1
  import { _indexOf } from '../equals.js'
2
2
  import { type as typeMethod } from '../type.js'
3
3
 
4
- export class _Set{
5
- constructor(){
4
+ export class _Set {
5
+ constructor() {
6
6
  this.set = new Set()
7
7
  this.items = {}
8
8
  }
9
9
 
10
- checkUniqueness(item){
10
+ checkUniqueness(item) {
11
11
  const type = typeMethod(item)
12
- if ([ 'Null', 'Undefined', 'NaN' ].includes(type)){
13
- if (type in this.items){
12
+ if (['Null', 'Undefined', 'NaN'].includes(type)) {
13
+ if (type in this.items) {
14
14
  return false
15
15
  }
16
- this.items[ type ] = true
16
+ this.items[type] = true
17
17
 
18
18
  return true
19
19
  }
20
- if (![ 'Object', 'Array' ].includes(type)){
20
+ if (!['Object', 'Array'].includes(type)) {
21
21
  const prevSize = this.set.size
22
22
  this.set.add(item)
23
23
 
24
24
  return this.set.size !== prevSize
25
25
  }
26
26
 
27
- if (!(type in this.items)){
28
- this.items[ type ] = [ item ]
27
+ if (!(type in this.items)) {
28
+ this.items[type] = [item]
29
29
 
30
30
  return true
31
31
  }
32
32
 
33
- if (_indexOf(item, this.items[ type ]) === -1){
34
- this.items[ type ].push(item)
33
+ if (_indexOf(item, this.items[type]) === -1) {
34
+ this.items[type].push(item)
35
35
 
36
36
  return true
37
37
  }
package/src/all.js CHANGED
@@ -1,9 +1,11 @@
1
- export function all(predicate, list){
2
- if (arguments.length === 1) return _list => all(predicate, _list)
1
+ export function all(predicate) {
2
+ return list => {
3
+ for (let i = 0; i < list.length; i++) {
4
+ if (!predicate(list[i])) {
5
+ return false
6
+ }
7
+ }
3
8
 
4
- for (let i = 0; i < list.length; i++){
5
- if (!predicate(list[ i ])) return false
9
+ return true
6
10
  }
7
-
8
- return true
9
11
  }
package/src/allPass.js CHANGED
@@ -1,8 +1,8 @@
1
- export function allPass(predicates){
2
- return (...input) => {
1
+ export function allPass(predicates) {
2
+ return input => {
3
3
  let counter = 0
4
- while (counter < predicates.length){
5
- if (!predicates[ counter ](...input)){
4
+ while (counter < predicates.length) {
5
+ if (!predicates[counter](input)) {
6
6
  return false
7
7
  }
8
8
  counter++
package/src/any.js CHANGED
@@ -1,13 +1,13 @@
1
- export function any(predicate, list){
2
- if (arguments.length === 1) return _list => any(predicate, _list)
3
-
4
- let counter = 0
5
- while (counter < list.length){
6
- if (predicate(list[ counter ], counter)){
7
- return true
1
+ export function any(predicate) {
2
+ return list => {
3
+ let counter = 0
4
+ while (counter < list.length) {
5
+ if (predicate(list[counter], counter)) {
6
+ return true
7
+ }
8
+ counter++
8
9
  }
9
- counter++
10
- }
11
10
 
12
- return false
11
+ return false
12
+ }
13
13
  }
package/src/anyPass.js CHANGED
@@ -1,8 +1,8 @@
1
- export function anyPass(predicates){
2
- return (...input) => {
1
+ export function anyPass(predicates) {
2
+ return input => {
3
3
  let counter = 0
4
- while (counter < predicates.length){
5
- if (predicates[ counter ](...input)){
4
+ while (counter < predicates.length) {
5
+ if (predicates[counter](input)) {
6
6
  return true
7
7
  }
8
8
  counter++
package/src/append.js CHANGED
@@ -1,12 +1,10 @@
1
1
  import { cloneList } from './_internals/cloneList.js'
2
2
 
3
- export function append(x, input){
4
- if (arguments.length === 1) return _input => append(x, _input)
5
-
6
- if (typeof input === 'string') return input.split('').concat(x)
7
-
8
- const clone = cloneList(input)
3
+ export function append(x) {
4
+ return list=> {
5
+ const clone = cloneList(list)
9
6
  clone.push(x)
10
7
 
11
8
  return clone
9
+ }
12
10
  }