rambda 9.4.2 → 10.0.0-beta.1

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