ramda-adjunct 2.34.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/.nvmrc +1 -0
- package/CHANGELOG.md +973 -0
- package/LICENSE.md +25 -0
- package/README.md +297 -0
- package/SECURITY.md +43 -0
- package/dist/RA.node.js +11172 -0
- package/dist/RA.node.min.js +2 -0
- package/dist/RA.node.min.js.LICENSE.txt +22 -0
- package/dist/RA.web.js +11172 -0
- package/dist/RA.web.min.js +2 -0
- package/dist/RA.web.min.js.LICENSE.txt +22 -0
- package/dist/RA.web.standalone.js +27797 -0
- package/dist/RA.web.standalone.min.js +2 -0
- package/dist/RA.web.standalone.min.js.LICENSE.txt +22 -0
- package/es/Y.js +38 -0
- package/es/allEqual.js +25 -0
- package/es/allEqualTo.js +26 -0
- package/es/allIdentical.js +24 -0
- package/es/allIdenticalTo.js +26 -0
- package/es/allP.js +26 -0
- package/es/allSettledP.js +29 -0
- package/es/allUnique.js +23 -0
- package/es/anyP.js +28 -0
- package/es/appendFlipped.js +23 -0
- package/es/argsPass.js +38 -0
- package/es/async.js +57 -0
- package/es/cata.js +101 -0
- package/es/catchP.js +24 -0
- package/es/ceil.js +26 -0
- package/es/compact.js +21 -0
- package/es/concatAll.js +30 -0
- package/es/concatRight.js +29 -0
- package/es/contained.js +29 -0
- package/es/curryRight.js +24 -0
- package/es/curryRightN.js +32 -0
- package/es/defaultWhen.js +25 -0
- package/es/delayP.js +44 -0
- package/es/dispatch.js +75 -0
- package/es/divideNum.js +19 -0
- package/es/dropArgs.js +22 -0
- package/es/ensureArray.js +22 -0
- package/es/escapeRegExp.js +20 -0
- package/es/fantasy-land/Identity.js +309 -0
- package/es/fantasy-land/mapping.js +20 -0
- package/es/fantasy-land/traits.js +41 -0
- package/es/fantasy-land/util.js +11 -0
- package/es/filterIndexed.js +27 -0
- package/es/findOr.js +28 -0
- package/es/flattenDepth.js +50 -0
- package/es/flattenPath.js +27 -0
- package/es/flattenProp.js +28 -0
- package/es/floor.js +25 -0
- package/es/fnull.js +37 -0
- package/es/hasPath.js +38 -0
- package/es/inRange.js +29 -0
- package/es/index.js +252 -0
- package/es/internal/ap.js +20 -0
- package/es/internal/compareLength.js +5 -0
- package/es/internal/isOfTypeObject.js +7 -0
- package/es/internal/makeFlat.js +46 -0
- package/es/internal/ponyfills/Array.from.js +40 -0
- package/es/internal/ponyfills/Math.sign.js +5 -0
- package/es/internal/ponyfills/Math.trunc.js +14 -0
- package/es/internal/ponyfills/Number.MAX_SAFE_INTEGER.js +2 -0
- package/es/internal/ponyfills/Number.MIN_SAFE_INTEGER.js +2 -0
- package/es/internal/ponyfills/Number.isFinite.js +5 -0
- package/es/internal/ponyfills/Number.isInteger.js +4 -0
- package/es/internal/ponyfills/Number.isNaN.js +5 -0
- package/es/internal/ponyfills/Number.isSafeInteger.js +7 -0
- package/es/internal/ponyfills/Promise.allSettled.js +38 -0
- package/es/internal/ponyfills/Promise.any.js +77 -0
- package/es/internal/ponyfills/String.padEnd.js +24 -0
- package/es/internal/ponyfills/String.padStart.js +26 -0
- package/es/internal/ponyfills/String.repeat.js +46 -0
- package/es/internal/ponyfills/String.replaceAll.js +34 -0
- package/es/internal/ponyfills/String.trimEnd.js +3 -0
- package/es/internal/ponyfills/String.trimStart.js +3 -0
- package/es/invoke.js +20 -0
- package/es/invokeArgs.js +30 -0
- package/es/isArray.js +22 -0
- package/es/isArrayLike.js +87 -0
- package/es/isAsyncFunction.js +22 -0
- package/es/isBigInt.js +23 -0
- package/es/isBoolean.js +21 -0
- package/es/isDate.js +20 -0
- package/es/isEmptyArray.js +26 -0
- package/es/isEmptyString.js +27 -0
- package/es/isError.js +20 -0
- package/es/isEven.js +29 -0
- package/es/isFalse.js +29 -0
- package/es/isFalsy.js +26 -0
- package/es/isFinite.js +33 -0
- package/es/isFloat.js +34 -0
- package/es/isFunction.js +26 -0
- package/es/isGeneratorFunction.js +33 -0
- package/es/isIndexed.js +21 -0
- package/es/isInteger.js +35 -0
- package/es/isInteger32.js +28 -0
- package/es/isIterable.js +33 -0
- package/es/isMap.js +23 -0
- package/es/isNaN.js +41 -0
- package/es/isNaturalNumber.js +25 -0
- package/es/isNegative.js +25 -0
- package/es/isNegativeZero.js +22 -0
- package/es/isNilOrEmpty.js +25 -0
- package/es/isNonEmptyArray.js +27 -0
- package/es/isNonEmptyString.js +30 -0
- package/es/isNonNegative.js +28 -0
- package/es/isNonPositive.js +28 -0
- package/es/isNotArray.js +22 -0
- package/es/isNotArrayLike.js +24 -0
- package/es/isNotAsyncFunction.js +27 -0
- package/es/isNotBoolean.js +22 -0
- package/es/isNotDate.js +21 -0
- package/es/isNotEmpty.js +25 -0
- package/es/isNotFinite.js +29 -0
- package/es/isNotFloat.js +33 -0
- package/es/isNotFunction.js +29 -0
- package/es/isNotGeneratorFunction.js +27 -0
- package/es/isNotInteger.js +34 -0
- package/es/isNotMap.js +24 -0
- package/es/isNotNaN.js +35 -0
- package/es/isNotNil.js +22 -0
- package/es/isNotNilOrEmpty.js +26 -0
- package/es/isNotNull.js +22 -0
- package/es/isNotNumber.js +23 -0
- package/es/isNotObj.js +29 -0
- package/es/isNotObjLike.js +29 -0
- package/es/isNotPair.js +25 -0
- package/es/isNotPlainObj.js +35 -0
- package/es/isNotPrimitive.js +22 -0
- package/es/isNotRegExp.js +22 -0
- package/es/isNotSet.js +23 -0
- package/es/isNotString.js +21 -0
- package/es/isNotUndefined.js +22 -0
- package/es/isNotValidDate.js +22 -0
- package/es/isNotValidNumber.js +25 -0
- package/es/isNull.js +21 -0
- package/es/isNumber.js +23 -0
- package/es/isObj.js +31 -0
- package/es/isObjLike.js +30 -0
- package/es/isOdd.js +24 -0
- package/es/isPair.js +25 -0
- package/es/isPlainObj.js +52 -0
- package/es/isPositive.js +24 -0
- package/es/isPositiveZero.js +22 -0
- package/es/isPrimitive.js +31 -0
- package/es/isPromise.js +27 -0
- package/es/isPrototypeOf.js +34 -0
- package/es/isRegExp.js +21 -0
- package/es/isSafeInteger.js +34 -0
- package/es/isSentinelValue.js +26 -0
- package/es/isSet.js +22 -0
- package/es/isSparseArray.js +30 -0
- package/es/isString.js +20 -0
- package/es/isSymbol.js +27 -0
- package/es/isThenable.js +26 -0
- package/es/isTrue.js +25 -0
- package/es/isTruthy.js +27 -0
- package/es/isUndefined.js +22 -0
- package/es/isValidDate.js +26 -0
- package/es/isValidNumber.js +26 -0
- package/es/lastP.js +63 -0
- package/es/lengthEq.js +22 -0
- package/es/lengthGt.js +22 -0
- package/es/lengthGte.js +24 -0
- package/es/lengthLt.js +22 -0
- package/es/lengthLte.js +23 -0
- package/es/lengthNotEq.js +22 -0
- package/es/lensEq.js +27 -0
- package/es/lensIso.js +55 -0
- package/es/lensNotEq.js +26 -0
- package/es/lensNotSatisfy.js +28 -0
- package/es/lensSatisfies.js +31 -0
- package/es/lensTraverse.js +42 -0
- package/es/liftF.js +37 -0
- package/es/liftFN.js +47 -0
- package/es/list.js +19 -0
- package/es/mapIndexed.js +26 -0
- package/es/mergePath.js +30 -0
- package/es/mergePaths.js +27 -0
- package/es/mergeProp.js +30 -0
- package/es/mergeProps.js +26 -0
- package/es/mergeRight.js +26 -0
- package/es/move.js +25 -0
- package/es/nand.js +27 -0
- package/es/neither.js +39 -0
- package/es/noneP.js +28 -0
- package/es/nonePass.js +31 -0
- package/es/noop.js +19 -0
- package/es/nor.js +28 -0
- package/es/notAllPass.js +31 -0
- package/es/notAllUnique.js +23 -0
- package/es/notBoth.js +39 -0
- package/es/notEqual.js +30 -0
- package/es/omitBy.js +26 -0
- package/es/omitIndexes.js +27 -0
- package/es/overlaps.js +29 -0
- package/es/padCharsEnd.js +31 -0
- package/es/padCharsStart.js +29 -0
- package/es/padEnd.js +24 -0
- package/es/padStart.js +22 -0
- package/es/pathNotEq.js +32 -0
- package/es/pathOrLazy.js +25 -0
- package/es/paths.js +27 -0
- package/es/pickIndexes.js +30 -0
- package/es/propNotEq.js +29 -0
- package/es/rangeStep.js +36 -0
- package/es/reduceIndexed.js +30 -0
- package/es/reduceP.js +111 -0
- package/es/reduceRightP.js +117 -0
- package/es/rejectP.js +23 -0
- package/es/renameKeyWith.js +28 -0
- package/es/renameKeys.js +42 -0
- package/es/renameKeysWith.js +26 -0
- package/es/repeatStr.js +24 -0
- package/es/replaceAll.js +29 -0
- package/es/resolveP.js +29 -0
- package/es/round.js +24 -0
- package/es/seq.js +44 -0
- package/es/sign.js +27 -0
- package/es/skipTake.js +22 -0
- package/es/sliceFrom.js +22 -0
- package/es/sliceTo.js +22 -0
- package/es/sortByProps.js +52 -0
- package/es/spreadPath.js +25 -0
- package/es/spreadProp.js +25 -0
- package/es/stubArray.js +19 -0
- package/es/stubNull.js +18 -0
- package/es/stubObj.js +20 -0
- package/es/stubString.js +18 -0
- package/es/stubUndefined.js +19 -0
- package/es/subtractNum.js +19 -0
- package/es/thenCatchP.js +26 -0
- package/es/thenP.js +28 -0
- package/es/toArray.js +27 -0
- package/es/toInteger32.js +24 -0
- package/es/toUinteger32.js +26 -0
- package/es/trimCharsEnd.js +22 -0
- package/es/trimCharsStart.js +22 -0
- package/es/trimEnd.js +23 -0
- package/es/trimStart.js +22 -0
- package/es/trunc.js +27 -0
- package/es/unzipObjWith.js +26 -0
- package/es/viewOr.js +30 -0
- package/es/weave.js +36 -0
- package/es/weaveLazy.js +38 -0
- package/es/zipObjWith.js +26 -0
- package/lib/Y.js +44 -0
- package/lib/allEqual.js +35 -0
- package/lib/allEqualTo.js +32 -0
- package/lib/allIdentical.js +33 -0
- package/lib/allIdenticalTo.js +32 -0
- package/lib/allP.js +32 -0
- package/lib/allSettledP.js +41 -0
- package/lib/allUnique.js +32 -0
- package/lib/anyP.js +47 -0
- package/lib/appendFlipped.js +29 -0
- package/lib/argsPass.js +48 -0
- package/lib/async.js +67 -0
- package/lib/cata.js +110 -0
- package/lib/catchP.js +30 -0
- package/lib/ceil.js +32 -0
- package/lib/compact.js +30 -0
- package/lib/concatAll.js +40 -0
- package/lib/concatRight.js +35 -0
- package/lib/contained.js +35 -0
- package/lib/curryRight.js +33 -0
- package/lib/curryRightN.js +38 -0
- package/lib/defaultWhen.js +31 -0
- package/lib/delayP.js +54 -0
- package/lib/dispatch.js +50 -0
- package/lib/divideNum.js +25 -0
- package/lib/dropArgs.js +28 -0
- package/lib/ensureArray.js +31 -0
- package/lib/escapeRegExp.js +29 -0
- package/lib/fantasy-land/Identity.js +323 -0
- package/lib/fantasy-land/mapping.js +44 -0
- package/lib/fantasy-land/traits.js +77 -0
- package/lib/fantasy-land/util.js +21 -0
- package/lib/filterIndexed.js +33 -0
- package/lib/findOr.js +34 -0
- package/lib/flattenDepth.js +58 -0
- package/lib/flattenPath.js +33 -0
- package/lib/flattenProp.js +37 -0
- package/lib/floor.js +31 -0
- package/lib/fnull.js +47 -0
- package/lib/hasPath.js +47 -0
- package/lib/inRange.js +37 -0
- package/lib/index.js +863 -0
- package/lib/internal/ap.js +37 -0
- package/lib/internal/compareLength.js +12 -0
- package/lib/internal/isOfTypeObject.js +13 -0
- package/lib/internal/makeFlat.js +54 -0
- package/lib/internal/ponyfills/Array.from.js +52 -0
- package/lib/internal/ponyfills/Math.sign.js +11 -0
- package/lib/internal/ponyfills/Math.trunc.js +22 -0
- package/lib/internal/ponyfills/Number.MAX_SAFE_INTEGER.js +7 -0
- package/lib/internal/ponyfills/Number.MIN_SAFE_INTEGER.js +7 -0
- package/lib/internal/ponyfills/Number.isFinite.js +15 -0
- package/lib/internal/ponyfills/Number.isInteger.js +14 -0
- package/lib/internal/ponyfills/Number.isNaN.js +15 -0
- package/lib/internal/ponyfills/Number.isSafeInteger.js +18 -0
- package/lib/internal/ponyfills/Promise.allSettled.js +48 -0
- package/lib/internal/ponyfills/Promise.any.js +89 -0
- package/lib/internal/ponyfills/String.padEnd.js +34 -0
- package/lib/internal/ponyfills/String.padStart.js +36 -0
- package/lib/internal/ponyfills/String.repeat.js +55 -0
- package/lib/internal/ponyfills/String.replaceAll.js +44 -0
- package/lib/internal/ponyfills/String.trimEnd.js +10 -0
- package/lib/internal/ponyfills/String.trimStart.js +10 -0
- package/lib/invoke.js +29 -0
- package/lib/invokeArgs.js +40 -0
- package/lib/isArray.js +31 -0
- package/lib/isArrayLike.js +98 -0
- package/lib/isAsyncFunction.js +28 -0
- package/lib/isBigInt.js +29 -0
- package/lib/isBoolean.js +27 -0
- package/lib/isDate.js +26 -0
- package/lib/isEmptyArray.js +35 -0
- package/lib/isEmptyString.js +33 -0
- package/lib/isError.js +26 -0
- package/lib/isEven.js +39 -0
- package/lib/isFalse.js +35 -0
- package/lib/isFalsy.js +35 -0
- package/lib/isFinite.js +46 -0
- package/lib/isFloat.js +44 -0
- package/lib/isFunction.js +36 -0
- package/lib/isGeneratorFunction.js +40 -0
- package/lib/isIndexed.js +31 -0
- package/lib/isInteger.js +47 -0
- package/lib/isInteger32.js +37 -0
- package/lib/isIterable.js +42 -0
- package/lib/isMap.js +29 -0
- package/lib/isNaN.js +54 -0
- package/lib/isNaturalNumber.js +35 -0
- package/lib/isNegative.js +34 -0
- package/lib/isNegativeZero.js +28 -0
- package/lib/isNilOrEmpty.js +31 -0
- package/lib/isNonEmptyArray.js +37 -0
- package/lib/isNonEmptyString.js +41 -0
- package/lib/isNonNegative.js +37 -0
- package/lib/isNonPositive.js +37 -0
- package/lib/isNotArray.js +31 -0
- package/lib/isNotArrayLike.js +33 -0
- package/lib/isNotAsyncFunction.js +36 -0
- package/lib/isNotBoolean.js +31 -0
- package/lib/isNotDate.js +30 -0
- package/lib/isNotEmpty.js +31 -0
- package/lib/isNotFinite.js +38 -0
- package/lib/isNotFloat.js +42 -0
- package/lib/isNotFunction.js +38 -0
- package/lib/isNotGeneratorFunction.js +36 -0
- package/lib/isNotInteger.js +43 -0
- package/lib/isNotMap.js +33 -0
- package/lib/isNotNaN.js +44 -0
- package/lib/isNotNil.js +28 -0
- package/lib/isNotNilOrEmpty.js +35 -0
- package/lib/isNotNull.js +31 -0
- package/lib/isNotNumber.js +32 -0
- package/lib/isNotObj.js +38 -0
- package/lib/isNotObjLike.js +38 -0
- package/lib/isNotPair.js +34 -0
- package/lib/isNotPlainObj.js +44 -0
- package/lib/isNotPrimitive.js +31 -0
- package/lib/isNotRegExp.js +31 -0
- package/lib/isNotSet.js +32 -0
- package/lib/isNotString.js +30 -0
- package/lib/isNotUndefined.js +31 -0
- package/lib/isNotValidDate.js +31 -0
- package/lib/isNotValidNumber.js +34 -0
- package/lib/isNull.js +27 -0
- package/lib/isNumber.js +29 -0
- package/lib/isObj.js +42 -0
- package/lib/isObjLike.js +40 -0
- package/lib/isOdd.js +33 -0
- package/lib/isPair.js +34 -0
- package/lib/isPlainObj.js +64 -0
- package/lib/isPositive.js +33 -0
- package/lib/isPositiveZero.js +28 -0
- package/lib/isPrimitive.js +47 -0
- package/lib/isPromise.js +36 -0
- package/lib/isPrototypeOf.js +43 -0
- package/lib/isRegExp.js +27 -0
- package/lib/isSafeInteger.js +46 -0
- package/lib/isSentinelValue.js +35 -0
- package/lib/isSet.js +28 -0
- package/lib/isSparseArray.js +39 -0
- package/lib/isString.js +26 -0
- package/lib/isSymbol.js +33 -0
- package/lib/isThenable.js +35 -0
- package/lib/isTrue.js +31 -0
- package/lib/isTruthy.js +33 -0
- package/lib/isUndefined.js +31 -0
- package/lib/isValidDate.js +36 -0
- package/lib/isValidNumber.js +36 -0
- package/lib/lastP.js +76 -0
- package/lib/lengthEq.js +31 -0
- package/lib/lengthGt.js +31 -0
- package/lib/lengthGte.js +33 -0
- package/lib/lengthLt.js +31 -0
- package/lib/lengthLte.js +32 -0
- package/lib/lengthNotEq.js +31 -0
- package/lib/lensEq.js +33 -0
- package/lib/lensIso.js +62 -0
- package/lib/lensNotEq.js +35 -0
- package/lib/lensNotSatisfy.js +37 -0
- package/lib/lensSatisfies.js +40 -0
- package/lib/lensTraverse.js +51 -0
- package/lib/liftF.js +46 -0
- package/lib/liftFN.js +56 -0
- package/lib/list.js +25 -0
- package/lib/mapIndexed.js +32 -0
- package/lib/mergePath.js +39 -0
- package/lib/mergePaths.js +36 -0
- package/lib/mergeProp.js +39 -0
- package/lib/mergeProps.js +32 -0
- package/lib/mergeRight.js +32 -0
- package/lib/move.js +31 -0
- package/lib/nand.js +33 -0
- package/lib/neither.js +45 -0
- package/lib/noneP.js +39 -0
- package/lib/nonePass.js +37 -0
- package/lib/noop.js +28 -0
- package/lib/nor.js +34 -0
- package/lib/notAllPass.js +37 -0
- package/lib/notAllUnique.js +32 -0
- package/lib/notBoth.js +45 -0
- package/lib/notEqual.js +36 -0
- package/lib/omitBy.js +32 -0
- package/lib/omitIndexes.js +34 -0
- package/lib/overlaps.js +38 -0
- package/lib/padCharsEnd.js +44 -0
- package/lib/padCharsStart.js +42 -0
- package/lib/padEnd.js +32 -0
- package/lib/padStart.js +30 -0
- package/lib/pathNotEq.js +38 -0
- package/lib/pathOrLazy.js +31 -0
- package/lib/paths.js +33 -0
- package/lib/pickIndexes.js +37 -0
- package/lib/propNotEq.js +35 -0
- package/lib/rangeStep.js +45 -0
- package/lib/reduceIndexed.js +36 -0
- package/lib/reduceP.js +122 -0
- package/lib/reduceRightP.js +129 -0
- package/lib/rejectP.js +29 -0
- package/lib/renameKeyWith.js +37 -0
- package/lib/renameKeys.js +51 -0
- package/lib/renameKeysWith.js +32 -0
- package/lib/repeatStr.js +37 -0
- package/lib/replaceAll.js +42 -0
- package/lib/resolveP.js +35 -0
- package/lib/round.js +30 -0
- package/lib/seq.js +50 -0
- package/lib/sign.js +39 -0
- package/lib/skipTake.js +28 -0
- package/lib/sliceFrom.js +28 -0
- package/lib/sliceTo.js +28 -0
- package/lib/sortByProps.js +58 -0
- package/lib/spreadPath.js +31 -0
- package/lib/spreadProp.js +34 -0
- package/lib/stubArray.js +25 -0
- package/lib/stubNull.js +24 -0
- package/lib/stubObj.js +26 -0
- package/lib/stubString.js +24 -0
- package/lib/stubUndefined.js +25 -0
- package/lib/subtractNum.js +25 -0
- package/lib/thenCatchP.js +33 -0
- package/lib/thenP.js +34 -0
- package/lib/toArray.js +40 -0
- package/lib/toInteger32.js +30 -0
- package/lib/toUinteger32.js +32 -0
- package/lib/trimCharsEnd.js +31 -0
- package/lib/trimCharsStart.js +31 -0
- package/lib/trimEnd.js +36 -0
- package/lib/trimStart.js +35 -0
- package/lib/trunc.js +39 -0
- package/lib/unzipObjWith.js +35 -0
- package/lib/viewOr.js +36 -0
- package/lib/weave.js +42 -0
- package/lib/weaveLazy.js +44 -0
- package/lib/zipObjWith.js +32 -0
- package/package.json +204 -0
- package/src/Y.js +32 -0
- package/src/allEqual.js +28 -0
- package/src/allEqualTo.js +25 -0
- package/src/allIdentical.js +26 -0
- package/src/allIdenticalTo.js +25 -0
- package/src/allP.js +27 -0
- package/src/allSettledP.js +34 -0
- package/src/allUnique.js +25 -0
- package/src/anyP.js +33 -0
- package/src/appendFlipped.js +24 -0
- package/src/argsPass.js +40 -0
- package/src/async.js +60 -0
- package/src/cata.js +86 -0
- package/src/catchP.js +25 -0
- package/src/ceil.js +28 -0
- package/src/compact.js +23 -0
- package/src/concatAll.js +34 -0
- package/src/concatRight.js +30 -0
- package/src/contained.js +30 -0
- package/src/curryRight.js +26 -0
- package/src/curryRightN.js +29 -0
- package/src/defaultWhen.js +26 -0
- package/src/delayP.js +45 -0
- package/src/dispatch.js +74 -0
- package/src/divideNum.js +20 -0
- package/src/dropArgs.js +23 -0
- package/src/ensureArray.js +24 -0
- package/src/escapeRegExp.js +22 -0
- package/src/fantasy-land/Identity.js +270 -0
- package/src/fantasy-land/mapping.js +20 -0
- package/src/fantasy-land/traits.js +57 -0
- package/src/fantasy-land/util.js +23 -0
- package/src/filterIndexed.js +28 -0
- package/src/findOr.js +30 -0
- package/src/flattenDepth.js +39 -0
- package/src/flattenPath.js +26 -0
- package/src/flattenProp.js +28 -0
- package/src/floor.js +27 -0
- package/src/fnull.js +38 -0
- package/src/hasPath.js +40 -0
- package/src/inRange.js +34 -0
- package/src/index.js +241 -0
- package/src/internal/ap.js +30 -0
- package/src/internal/compareLength.js +7 -0
- package/src/internal/isOfTypeObject.js +3 -0
- package/src/internal/makeFlat.js +42 -0
- package/src/internal/ponyfills/Array.from.js +34 -0
- package/src/internal/ponyfills/Math.sign.js +3 -0
- package/src/internal/ponyfills/Math.trunc.js +14 -0
- package/src/internal/ponyfills/Number.MAX_SAFE_INTEGER.js +3 -0
- package/src/internal/ponyfills/Number.MIN_SAFE_INTEGER.js +3 -0
- package/src/internal/ponyfills/Number.isFinite.js +8 -0
- package/src/internal/ponyfills/Number.isInteger.js +10 -0
- package/src/internal/ponyfills/Number.isNaN.js +8 -0
- package/src/internal/ponyfills/Number.isSafeInteger.js +11 -0
- package/src/internal/ponyfills/Promise.allSettled.js +18 -0
- package/src/internal/ponyfills/Promise.any.js +29 -0
- package/src/internal/ponyfills/String.padEnd.js +25 -0
- package/src/internal/ponyfills/String.padStart.js +27 -0
- package/src/internal/ponyfills/String.repeat.js +49 -0
- package/src/internal/ponyfills/String.replaceAll.js +44 -0
- package/src/internal/ponyfills/String.trimEnd.js +5 -0
- package/src/internal/ponyfills/String.trimStart.js +5 -0
- package/src/invoke.js +22 -0
- package/src/invokeArgs.js +36 -0
- package/src/isArray.js +27 -0
- package/src/isArrayLike.js +79 -0
- package/src/isAsyncFunction.js +23 -0
- package/src/isBigInt.js +24 -0
- package/src/isBoolean.js +22 -0
- package/src/isDate.js +21 -0
- package/src/isEmptyArray.js +28 -0
- package/src/isEmptyString.js +28 -0
- package/src/isError.js +21 -0
- package/src/isEven.js +31 -0
- package/src/isFalse.js +31 -0
- package/src/isFalsy.js +28 -0
- package/src/isFinite.js +37 -0
- package/src/isFloat.js +36 -0
- package/src/isFunction.js +32 -0
- package/src/isGeneratorFunction.js +43 -0
- package/src/isIndexed.js +24 -0
- package/src/isInteger.js +40 -0
- package/src/isInteger32.js +28 -0
- package/src/isIterable.js +37 -0
- package/src/isMap.js +25 -0
- package/src/isNaN.js +45 -0
- package/src/isNaturalNumber.js +28 -0
- package/src/isNegative.js +27 -0
- package/src/isNegativeZero.js +23 -0
- package/src/isNilOrEmpty.js +26 -0
- package/src/isNonEmptyArray.js +29 -0
- package/src/isNonEmptyString.js +32 -0
- package/src/isNonNegative.js +30 -0
- package/src/isNonPositive.js +30 -0
- package/src/isNotArray.js +24 -0
- package/src/isNotArrayLike.js +26 -0
- package/src/isNotAsyncFunction.js +27 -0
- package/src/isNotBoolean.js +24 -0
- package/src/isNotDate.js +23 -0
- package/src/isNotEmpty.js +26 -0
- package/src/isNotFinite.js +31 -0
- package/src/isNotFloat.js +35 -0
- package/src/isNotFunction.js +29 -0
- package/src/isNotGeneratorFunction.js +27 -0
- package/src/isNotInteger.js +36 -0
- package/src/isNotMap.js +27 -0
- package/src/isNotNaN.js +37 -0
- package/src/isNotNil.js +23 -0
- package/src/isNotNilOrEmpty.js +28 -0
- package/src/isNotNull.js +24 -0
- package/src/isNotNumber.js +25 -0
- package/src/isNotObj.js +29 -0
- package/src/isNotObjLike.js +29 -0
- package/src/isNotPair.js +27 -0
- package/src/isNotPlainObj.js +35 -0
- package/src/isNotPrimitive.js +25 -0
- package/src/isNotRegExp.js +24 -0
- package/src/isNotSet.js +26 -0
- package/src/isNotString.js +23 -0
- package/src/isNotUndefined.js +24 -0
- package/src/isNotValidDate.js +24 -0
- package/src/isNotValidNumber.js +27 -0
- package/src/isNull.js +22 -0
- package/src/isNumber.js +24 -0
- package/src/isObj.js +31 -0
- package/src/isObjLike.js +30 -0
- package/src/isOdd.js +29 -0
- package/src/isPair.js +27 -0
- package/src/isPlainObj.js +65 -0
- package/src/isPositive.js +26 -0
- package/src/isPositiveZero.js +23 -0
- package/src/isPrimitive.js +45 -0
- package/src/isPromise.js +32 -0
- package/src/isPrototypeOf.js +36 -0
- package/src/isRegExp.js +22 -0
- package/src/isSafeInteger.js +40 -0
- package/src/isSentinelValue.js +26 -0
- package/src/isSet.js +24 -0
- package/src/isSparseArray.js +43 -0
- package/src/isString.js +21 -0
- package/src/isSymbol.js +29 -0
- package/src/isThenable.js +28 -0
- package/src/isTrue.js +27 -0
- package/src/isTruthy.js +28 -0
- package/src/isUndefined.js +24 -0
- package/src/isValidDate.js +29 -0
- package/src/isValidNumber.js +28 -0
- package/src/lastP.js +54 -0
- package/src/lengthEq.js +24 -0
- package/src/lengthGt.js +24 -0
- package/src/lengthGte.js +26 -0
- package/src/lengthLt.js +24 -0
- package/src/lengthLte.js +25 -0
- package/src/lengthNotEq.js +24 -0
- package/src/lensEq.js +28 -0
- package/src/lensIso.js +51 -0
- package/src/lensNotEq.js +28 -0
- package/src/lensNotSatisfy.js +30 -0
- package/src/lensSatisfies.js +33 -0
- package/src/lensTraverse.js +44 -0
- package/src/liftF.js +37 -0
- package/src/liftFN.js +45 -0
- package/src/list.js +20 -0
- package/src/mapIndexed.js +27 -0
- package/src/mergePath.js +32 -0
- package/src/mergePaths.js +29 -0
- package/src/mergeProp.js +30 -0
- package/src/mergeProps.js +27 -0
- package/src/mergeRight.js +27 -0
- package/src/move.js +26 -0
- package/src/nand.js +27 -0
- package/src/neither.js +38 -0
- package/src/noneP.js +35 -0
- package/src/nonePass.js +32 -0
- package/src/noop.js +21 -0
- package/src/nor.js +28 -0
- package/src/notAllPass.js +32 -0
- package/src/notAllUnique.js +25 -0
- package/src/notBoth.js +38 -0
- package/src/notEqual.js +31 -0
- package/src/omitBy.js +25 -0
- package/src/omitIndexes.js +27 -0
- package/src/overlaps.js +32 -0
- package/src/padCharsEnd.js +37 -0
- package/src/padCharsStart.js +35 -0
- package/src/padEnd.js +25 -0
- package/src/padStart.js +23 -0
- package/src/pathNotEq.js +31 -0
- package/src/pathOrLazy.js +30 -0
- package/src/paths.js +26 -0
- package/src/pickIndexes.js +30 -0
- package/src/propNotEq.js +30 -0
- package/src/rangeStep.js +37 -0
- package/src/reduceIndexed.js +31 -0
- package/src/reduceP.js +96 -0
- package/src/reduceRightP.js +101 -0
- package/src/rejectP.js +24 -0
- package/src/renameKeyWith.js +30 -0
- package/src/renameKeys.js +40 -0
- package/src/renameKeysWith.js +27 -0
- package/src/repeatStr.js +30 -0
- package/src/replaceAll.js +35 -0
- package/src/resolveP.js +28 -0
- package/src/round.js +26 -0
- package/src/seq.js +38 -0
- package/src/sign.js +33 -0
- package/src/skipTake.js +33 -0
- package/src/sliceFrom.js +23 -0
- package/src/sliceTo.js +23 -0
- package/src/sortByProps.js +31 -0
- package/src/spreadPath.js +26 -0
- package/src/spreadProp.js +25 -0
- package/src/stubArray.js +18 -0
- package/src/stubNull.js +19 -0
- package/src/stubObj.js +19 -0
- package/src/stubString.js +19 -0
- package/src/stubUndefined.js +19 -0
- package/src/subtractNum.js +20 -0
- package/src/thenCatchP.js +27 -0
- package/src/thenP.js +29 -0
- package/src/toArray.js +32 -0
- package/src/toInteger32.js +22 -0
- package/src/toUinteger32.js +26 -0
- package/src/trimCharsEnd.js +25 -0
- package/src/trimCharsStart.js +25 -0
- package/src/trimEnd.js +30 -0
- package/src/trimStart.js +29 -0
- package/src/trunc.js +33 -0
- package/src/unzipObjWith.js +40 -0
- package/src/viewOr.js +32 -0
- package/src/weave.js +35 -0
- package/src/weaveLazy.js +37 -0
- package/src/zipObjWith.js +27 -0
- package/tonicExample.js +4 -0
- package/types/index.d.ts +1553 -0
package/lib/move.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Returns a new list with the item at the position `fromIdx` moved to the position `toIdx`. If the
|
|
10
|
+
* `toIdx` is out of the `list` range, the item will be placed at the last position of the `list`.
|
|
11
|
+
* When negative indices are provided, the behavior of the move is unspecified.
|
|
12
|
+
*
|
|
13
|
+
* @func move
|
|
14
|
+
* @memberOf RA
|
|
15
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.8.0|v2.8.0}
|
|
16
|
+
* @category List
|
|
17
|
+
* @sig Number -> Number -> [a] -> [a]
|
|
18
|
+
* @param {number} fromIdx The position of item to be moved
|
|
19
|
+
* @param {number} toIdx The position of item after move
|
|
20
|
+
* @param {Array} list The list containing the item to be moved
|
|
21
|
+
* @return {Array}
|
|
22
|
+
* @example
|
|
23
|
+
*
|
|
24
|
+
* const list = ['a', 'b', 'c', 'd', 'e'];
|
|
25
|
+
* RA.move(1, 3, list) //=> ['a', 'c', 'd', 'b', 'e']
|
|
26
|
+
*/
|
|
27
|
+
var move = (0, _ramda.curry)(function (fromIdx, toIdx, list) {
|
|
28
|
+
return (0, _ramda.compose)((0, _ramda.insert)(toIdx, (0, _ramda.nth)(fromIdx, list)), (0, _ramda.remove)(fromIdx, 1))(list);
|
|
29
|
+
});
|
|
30
|
+
var _default = move;
|
|
31
|
+
exports["default"] = _default;
|
package/lib/nand.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Returns false if both arguments are truthy; true otherwise.
|
|
10
|
+
*
|
|
11
|
+
* @func nand
|
|
12
|
+
* @memberOf RA
|
|
13
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.19.0|v2.19.0}
|
|
14
|
+
* @category Logic
|
|
15
|
+
* @sig a -> b -> Boolean
|
|
16
|
+
* @param {*} a
|
|
17
|
+
* @param {*} b
|
|
18
|
+
* @return {Boolean} false if both arguments are truesy
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* RA.nand(true, true); //=> false
|
|
22
|
+
* RA.nand(false, true); //=> true
|
|
23
|
+
* RA.nand(true, false); //=> true
|
|
24
|
+
* RA.nand(false, false); //=> true
|
|
25
|
+
* RA.nand(1.0, 1.0); //=> false
|
|
26
|
+
* RA.nand(1.0, 0); //=> true
|
|
27
|
+
* RA.nand(0, 1.0); //=> true
|
|
28
|
+
* RA.nand(0, 0); //=> true
|
|
29
|
+
*/
|
|
30
|
+
var nand = (0, _ramda.complement)(_ramda.and); // eslint-disable-line ramda/complement-simplification
|
|
31
|
+
|
|
32
|
+
var _default = nand;
|
|
33
|
+
exports["default"] = _default;
|
package/lib/neither.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
/* eslint-disable max-len */
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A function which calls the two provided functions and returns the complement of `||`ing the
|
|
12
|
+
* results.
|
|
13
|
+
* It returns false if the first function is truth-y and the complement of the second function
|
|
14
|
+
* otherwise. Note that this is short-circuited, meaning that the second function will not be
|
|
15
|
+
* invoked if the first returns a truth-y value. In short it will return true if neither predicate
|
|
16
|
+
* returns true.
|
|
17
|
+
*
|
|
18
|
+
* In addition to functions, `RA.neither` also accepts any fantasy-land compatible
|
|
19
|
+
* applicative functor.
|
|
20
|
+
*
|
|
21
|
+
* @func neither
|
|
22
|
+
* @memberOf RA
|
|
23
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.3.0|v2.3.0}
|
|
24
|
+
* @category Logic
|
|
25
|
+
* @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)
|
|
26
|
+
* @param {Function} f A predicate
|
|
27
|
+
* @param {Function} g Another predicate
|
|
28
|
+
* @return {Function} Returns a function that applies its arguments to `f` and `g` and returns the complement of `||`ing their outputs together.
|
|
29
|
+
* @see {@link http://ramdajs.com/docs/#either|R.either}, {@link http://ramdajs.com/docs/#or|R.or}
|
|
30
|
+
* @example
|
|
31
|
+
*
|
|
32
|
+
* const gt10 = R.gt(R.__, 10)
|
|
33
|
+
* const even = (x) => x % 2 === 0;
|
|
34
|
+
* const f = RA.neither(gt10, even);
|
|
35
|
+
*
|
|
36
|
+
* f(12); //=> false
|
|
37
|
+
* f(8); //=> false
|
|
38
|
+
* f(11); //=> false
|
|
39
|
+
* f(9); //=> true
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/* eslint-enable max-len */
|
|
43
|
+
var neither = (0, _ramda.curry)((0, _ramda.compose)(_ramda.complement, _ramda.either));
|
|
44
|
+
var _default = neither;
|
|
45
|
+
exports["default"] = _default;
|
package/lib/noneP.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
var _allP = _interopRequireDefault(require("./allP"));
|
|
9
|
+
|
|
10
|
+
var _rejectP = _interopRequireDefault(require("./rejectP"));
|
|
11
|
+
|
|
12
|
+
var _resolveP = _interopRequireDefault(require("./resolveP"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Returns a Promise that is resolved with an array of reasons when all of the provided Promises reject, or rejected when any Promise is resolved.
|
|
18
|
+
* This pattern is like allP, but fulfillments and rejections are transposed - rejections become the fulfillment values and vice versa.
|
|
19
|
+
*
|
|
20
|
+
* @func noneP
|
|
21
|
+
* @memberOf RA
|
|
22
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
|
|
23
|
+
* @category Function
|
|
24
|
+
* @sig [Promise a] -> Promise [a]
|
|
25
|
+
* @param {Iterable.<*>} iterable An iterable object such as an Array or String
|
|
26
|
+
* @return {Promise} A Promise that is resolved with a list of rejection reasons if all Promises are rejected, or a Promise that is rejected with the fulfillment value of the first Promise that resolves.
|
|
27
|
+
* @see {@link RA.allP|allP}
|
|
28
|
+
* @example
|
|
29
|
+
*
|
|
30
|
+
* RA.noneP([Promise.reject('hello'), Promise.reject('world')]); //=> Promise(['hello', 'world'])
|
|
31
|
+
* RA.noneP([]); //=> Promise([])
|
|
32
|
+
* RA.noneP([Promise.reject(), Promise.resolve('hello world')]); //=> Promise('hello world')
|
|
33
|
+
* RA.noneP([Promise.reject(), 'hello world']); //=> Promise('hello world')
|
|
34
|
+
*/
|
|
35
|
+
var noneP = (0, _ramda.curryN)(1, (0, _ramda.pipe)((0, _ramda.map)(_resolveP["default"]), (0, _ramda.map)(function (p) {
|
|
36
|
+
return p.then(_rejectP["default"], _resolveP["default"]);
|
|
37
|
+
}), _allP["default"]));
|
|
38
|
+
var _default = noneP;
|
|
39
|
+
exports["default"] = _default;
|
package/lib/nonePass.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Takes a list of predicates and returns a predicate that returns true for a given list of
|
|
10
|
+
* arguments if none of the provided predicates are satisfied by those arguments. It is the
|
|
11
|
+
* complement of Ramda's anyPass.
|
|
12
|
+
*
|
|
13
|
+
* The function returned is a curried function whose arity matches that of the
|
|
14
|
+
* highest-arity predicate.
|
|
15
|
+
*
|
|
16
|
+
* @func nonePass
|
|
17
|
+
* @memberOf RA
|
|
18
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.5.0|v2.5.0}
|
|
19
|
+
* @category Logic
|
|
20
|
+
* @sig [(*... -> Boolean)] -> (*... -> Boolean)
|
|
21
|
+
* @param {Array} predicates An array of predicates to check
|
|
22
|
+
* @return {Function} The combined predicate
|
|
23
|
+
* @see {@link http://ramdajs.com/docs/#anyPass|R.anyPass}
|
|
24
|
+
* @example
|
|
25
|
+
*
|
|
26
|
+
* const gt10 = R.gt(R.__, 10)
|
|
27
|
+
* const even = (x) => x % 2 === 0;
|
|
28
|
+
* const f = RA.nonePass([gt10, even]);
|
|
29
|
+
*
|
|
30
|
+
* f(12); //=> false
|
|
31
|
+
* f(8); //=> false
|
|
32
|
+
* f(11); //=> false
|
|
33
|
+
* f(9); //=> true
|
|
34
|
+
*/
|
|
35
|
+
var nonePass = (0, _ramda.curryN)(1, (0, _ramda.compose)(_ramda.complement, _ramda.anyPass));
|
|
36
|
+
var _default = nonePass;
|
|
37
|
+
exports["default"] = _default;
|
package/lib/noop.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
var _stubUndefined = _interopRequireDefault(require("./stubUndefined"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A function that performs no operations.
|
|
14
|
+
*
|
|
15
|
+
* @func noop
|
|
16
|
+
* @memberOf RA
|
|
17
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/1.0.0|v1.0.0}
|
|
18
|
+
* @category Function
|
|
19
|
+
* @sig ... -> undefined
|
|
20
|
+
* @return {undefined}
|
|
21
|
+
* @example
|
|
22
|
+
*
|
|
23
|
+
* RA.noop(); //=> undefined
|
|
24
|
+
* RA.noop(1, 2, 3); //=> undefined
|
|
25
|
+
*/
|
|
26
|
+
var noop = (0, _ramda.always)((0, _stubUndefined["default"])());
|
|
27
|
+
var _default = noop;
|
|
28
|
+
exports["default"] = _default;
|
package/lib/nor.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Returns true if both arguments are falsy; false otherwise.
|
|
10
|
+
*
|
|
11
|
+
* @func nor
|
|
12
|
+
* @memberOf RA
|
|
13
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.20.0|v2.20.0}
|
|
14
|
+
* @category Logic
|
|
15
|
+
* @sig a -> b -> a ⊽ b
|
|
16
|
+
* @param {*} a
|
|
17
|
+
* @param {*} b
|
|
18
|
+
* @return {boolean} true if both arguments are falsy
|
|
19
|
+
* @see {@link RA.neither|neither}
|
|
20
|
+
* @example
|
|
21
|
+
*
|
|
22
|
+
* RA.nor(true, true); //=> false
|
|
23
|
+
* RA.nor(false, true); //=> false
|
|
24
|
+
* RA.nor(true, false); //=> false
|
|
25
|
+
* RA.nor(false, false); //=> true
|
|
26
|
+
* RA.nor(1, 1); //=> false
|
|
27
|
+
* RA.nor(1, 0); //=> false
|
|
28
|
+
* RA.nor(0, 1); //=> false
|
|
29
|
+
* RA.nor(0, 0); //=> true
|
|
30
|
+
*/
|
|
31
|
+
var nor = (0, _ramda.complement)(_ramda.or); // eslint-disable-line ramda/complement-simplification
|
|
32
|
+
|
|
33
|
+
var _default = nor;
|
|
34
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Takes a list of predicates and returns a predicate that returns true for a given list of
|
|
10
|
+
* arguments if one or more of the provided predicates is not satisfied by those arguments. It is
|
|
11
|
+
* the complement of Ramda's allPass.
|
|
12
|
+
*
|
|
13
|
+
* The function returned is a curried function whose arity matches that of the
|
|
14
|
+
* highest-arity predicate.
|
|
15
|
+
*
|
|
16
|
+
* @func notAllPass
|
|
17
|
+
* @memberOf RA
|
|
18
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}
|
|
19
|
+
* @category Logic
|
|
20
|
+
* @sig [(*... -> Boolean)] -> (*... -> Boolean)
|
|
21
|
+
* @param {Array} predicates An array of predicates to check
|
|
22
|
+
* @return {Function} The combined predicate
|
|
23
|
+
* @see {@link http://ramdajs.com/docs/#allPass|R.allPass}
|
|
24
|
+
* @example
|
|
25
|
+
*
|
|
26
|
+
* const gt10 = R.gt(R.__, 10)
|
|
27
|
+
* const even = (x) => x % 2 === 0;
|
|
28
|
+
* const f = RA.notAllPass([gt10, even]);
|
|
29
|
+
*
|
|
30
|
+
* f(12); //=> false
|
|
31
|
+
* f(8); //=> true
|
|
32
|
+
* f(11); //=> true
|
|
33
|
+
* f(9); //=> true
|
|
34
|
+
*/
|
|
35
|
+
var notAllPass = (0, _ramda.curry)((0, _ramda.compose)(_ramda.complement, _ramda.allPass));
|
|
36
|
+
var _default = notAllPass;
|
|
37
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
var _allUnique = _interopRequireDefault(require("./allUnique"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Returns true if at least one item of the list is repeated. `R.equals` is used to determine equality.
|
|
14
|
+
*
|
|
15
|
+
* @func notAllUnique
|
|
16
|
+
* @memberOf RA
|
|
17
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
|
|
18
|
+
* @category List
|
|
19
|
+
* @sig [a] -> Boolean
|
|
20
|
+
* @param {Array} list The list of values
|
|
21
|
+
* @return {boolean}
|
|
22
|
+
* @see {@link RA.allUnique|allUnique}, {@link https://ramdajs.com/docs/#equals|equals}
|
|
23
|
+
* @example
|
|
24
|
+
*
|
|
25
|
+
* RA.notAllUnique([ 1, 1, 2, 3 ]); //=> true
|
|
26
|
+
* RA.notAllUnique([ 1, 2, 3, 4 ]); //=> false
|
|
27
|
+
* RA.notAllUnique([]); //=> false
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
var notAllUnique = (0, _ramda.complement)(_allUnique["default"]);
|
|
31
|
+
var _default = notAllUnique;
|
|
32
|
+
exports["default"] = _default;
|
package/lib/notBoth.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
/* eslint-disable max-len */
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A function which calls the two provided functions and returns the complement of `&&`ing the
|
|
12
|
+
* results.
|
|
13
|
+
* It returns true if the first function is false-y and the complement of the second function
|
|
14
|
+
* otherwise. Note that this is short-circuited, meaning that the second function will not be
|
|
15
|
+
* invoked if the first returns a false-y value. In short it will return true unless both predicates
|
|
16
|
+
* return true.
|
|
17
|
+
*
|
|
18
|
+
* In addition to functions, `RA.notBoth` also accepts any fantasy-land compatible
|
|
19
|
+
* applicative functor.
|
|
20
|
+
*
|
|
21
|
+
* @func notBoth
|
|
22
|
+
* @memberOf RA
|
|
23
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.3.0|v2.3.0}
|
|
24
|
+
* @category Logic
|
|
25
|
+
* @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)
|
|
26
|
+
* @param {Function} f A predicate
|
|
27
|
+
* @param {Function} g Another predicate
|
|
28
|
+
* @return {Function} Returns a function that applies its arguments to `f` and `g` and returns the complement of `&&`ing their outputs together.
|
|
29
|
+
* @see {@link http://ramdajs.com/docs/#both|R.both}
|
|
30
|
+
* @example
|
|
31
|
+
*
|
|
32
|
+
* const gt10 = R.gt(R.__, 10)
|
|
33
|
+
* const even = (x) => x % 2 === 0;
|
|
34
|
+
* const f = RA.notBoth(gt10, even);
|
|
35
|
+
*
|
|
36
|
+
* f(12); //=> false
|
|
37
|
+
* f(8); //=> true
|
|
38
|
+
* f(11); //=> true
|
|
39
|
+
* f(9); //=> true
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/* eslint-enable max-len */
|
|
43
|
+
var notBoth = (0, _ramda.curry)((0, _ramda.compose)(_ramda.complement, _ramda.both));
|
|
44
|
+
var _default = notBoth;
|
|
45
|
+
exports["default"] = _default;
|
package/lib/notEqual.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Returns `true` if its arguments are not equivalent, `false` otherwise. Handles
|
|
10
|
+
* cyclical data structures.
|
|
11
|
+
*
|
|
12
|
+
* Dispatches symmetrically to the `equals` methods of both arguments, if
|
|
13
|
+
* present.
|
|
14
|
+
*
|
|
15
|
+
* @func notEqual
|
|
16
|
+
* @memberOf RA
|
|
17
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.29.0|v2.29.0}
|
|
18
|
+
* @category Relation
|
|
19
|
+
* @sig a -> b -> Boolean
|
|
20
|
+
* @param {*} a
|
|
21
|
+
* @param {*} b
|
|
22
|
+
* @return {Boolean}
|
|
23
|
+
* @see {@link https://ramdajs.com/docs/#equals|equals}
|
|
24
|
+
* @example
|
|
25
|
+
*
|
|
26
|
+
* RA.notEqual(1, 1); //=> false
|
|
27
|
+
* RA.notEqual(1, '1'); //=> true
|
|
28
|
+
* RA.notEqual([1, 2, 3], [1, 2, 3]); //=> false
|
|
29
|
+
*
|
|
30
|
+
* const a = {}; a.v = a;
|
|
31
|
+
* const b = {}; b.v = b;
|
|
32
|
+
* RA.notEqual(a, b); //=> false
|
|
33
|
+
*/
|
|
34
|
+
var notEqual = (0, _ramda.complement)(_ramda.equals);
|
|
35
|
+
var _default = notEqual;
|
|
36
|
+
exports["default"] = _default;
|
package/lib/omitBy.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
/* eslint-disable max-len */
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Returns a partial copy of an object containing only the keys
|
|
12
|
+
* that don't satisfy the supplied predicate.
|
|
13
|
+
*
|
|
14
|
+
* @func omitBy
|
|
15
|
+
* @memberOf RA
|
|
16
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.6.0|v2.6.0}
|
|
17
|
+
* @category Object
|
|
18
|
+
* @sig ((v, k) -> Boolean) -> {k: v} -> {k: v}
|
|
19
|
+
* @param {!Function} pred A predicate to determine whether or not a key should be included on the output object
|
|
20
|
+
* @param {!Object} obj The object to copy from
|
|
21
|
+
* @return {!Object} A new object only with properties that don't satisfy `pred`
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
*
|
|
25
|
+
* const isLowerCase = (val, key) => key.toLowerCase() === key;
|
|
26
|
+
* RA.omitBy(isLowerCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4}
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/* eslint-enable max-len */
|
|
30
|
+
var omitBy = (0, _ramda.useWith)(_ramda.pickBy, [_ramda.complement, _ramda.identity]);
|
|
31
|
+
var _default = omitBy;
|
|
32
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
// helpers
|
|
9
|
+
var rejectIndexed = (0, _ramda.addIndex)(_ramda.reject);
|
|
10
|
+
var containsIndex = (0, _ramda.curry)(function (indexes, val, index) {
|
|
11
|
+
return (0, _ramda.contains)(index, indexes);
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* Returns a partial copy of an array omitting the indexes specified.
|
|
15
|
+
*
|
|
16
|
+
* @func omitIndexes
|
|
17
|
+
* @memberOf RA
|
|
18
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/1.19.0|v1.19.0}
|
|
19
|
+
* @category List
|
|
20
|
+
* @sig [Int] -> [a] -> [a]
|
|
21
|
+
* @see {@link http://ramdajs.com/docs/#omit|R.omit}, {@link RA.pickIndexes|pickIndexes}
|
|
22
|
+
* @param {!Array} indexes The array of indexes to omit from the new array
|
|
23
|
+
* @param {!Array} list The array to copy from
|
|
24
|
+
* @return {!Array} The new array with omitted indexes
|
|
25
|
+
* @example
|
|
26
|
+
*
|
|
27
|
+
* RA.omitIndexes([-1, 1, 3], ['a', 'b', 'c', 'd']); //=> ['a', 'c']
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
var omitIndexes = (0, _ramda.curry)(function (indexes, list) {
|
|
31
|
+
return rejectIndexed(containsIndex(indexes), list);
|
|
32
|
+
});
|
|
33
|
+
var _default = omitIndexes;
|
|
34
|
+
exports["default"] = _default;
|
package/lib/overlaps.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
var _isNotEmpty = _interopRequireDefault(require("./isNotEmpty"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Returns true if two lists have at least one element common to both lists.
|
|
14
|
+
*
|
|
15
|
+
* @func overlaps
|
|
16
|
+
* @memberOf RA
|
|
17
|
+
* @category Relation
|
|
18
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.30.0|v2.30.0}
|
|
19
|
+
* @sig [a] -> [a] -> Boolean
|
|
20
|
+
* @param {Array} list1 The first list
|
|
21
|
+
* @param {Array} list2 The second list
|
|
22
|
+
* @return {boolean} True if two lists have at least one element common to both lists
|
|
23
|
+
* @example
|
|
24
|
+
*
|
|
25
|
+
* RA.overlaps(['-v', '--verbose'], ['node', 'script.js', '-v']); //=> true
|
|
26
|
+
* RA.overlaps(['-v', '--verbose'], []); //=> false
|
|
27
|
+
* RA.overlaps([1, 2, 3], [3, 4, 5]); //=> true
|
|
28
|
+
* RA.overlaps([1, 2, 3], [4, 5]); //=> false
|
|
29
|
+
*/
|
|
30
|
+
var overlaps = (0, _ramda.curryN)(2, function (list1, list2) {
|
|
31
|
+
if ((0, _ramda.isEmpty)(list1)) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return (0, _ramda.pipe)(_ramda.intersection, _isNotEmpty["default"])(list1, list2);
|
|
36
|
+
});
|
|
37
|
+
var _default = overlaps;
|
|
38
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = exports.padEndInvoker = exports.padEndPonyfill = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
var _String = _interopRequireDefault(require("./internal/ponyfills/String.padEnd"));
|
|
9
|
+
|
|
10
|
+
var _isFunction = _interopRequireDefault(require("./isFunction"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var padEndPonyfill = (0, _ramda.curry)(_String["default"]);
|
|
15
|
+
exports.padEndPonyfill = padEndPonyfill;
|
|
16
|
+
var padEndInvoker = (0, _ramda.flip)((0, _ramda.invoker)(2, 'padEnd'));
|
|
17
|
+
/**
|
|
18
|
+
* The function pads the current string with a given string
|
|
19
|
+
* (repeated, if needed) so that the resulting string reaches a given length.
|
|
20
|
+
* The padding is applied from the end of the current string.
|
|
21
|
+
*
|
|
22
|
+
* @func padCharsEnd
|
|
23
|
+
* @memberOf RA
|
|
24
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
|
|
25
|
+
* @category String
|
|
26
|
+
* @sig String -> Number -> String -> String
|
|
27
|
+
* @param {string} padString The string to pad the current string with
|
|
28
|
+
* @param {number} targetLength The length of the resulting string once
|
|
29
|
+
* the current string has been padded
|
|
30
|
+
* @param {string} value String value to be padded
|
|
31
|
+
* @return {string} A new string of the specified length with the pad string
|
|
32
|
+
* applied at the end of the current string
|
|
33
|
+
* @see {@link RA.padEnd|padEnd}, {@link RA.padCharsStart|padCharsStart}, {@link RA.padStart|padStart}
|
|
34
|
+
* @example
|
|
35
|
+
*
|
|
36
|
+
* RA.padCharsEnd('-', 3, 'a'); // => 'a--'
|
|
37
|
+
* RA.padCharsEnd('foo', 10, 'abc'); // => 'abcfoofoof'
|
|
38
|
+
* RA.padCharsEnd('123456', 6, 'abc'); // => 'abc123'
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
exports.padEndInvoker = padEndInvoker;
|
|
42
|
+
var padCharsEnd = (0, _isFunction["default"])(String.prototype.padEnd) ? padEndInvoker : padEndPonyfill;
|
|
43
|
+
var _default = padCharsEnd;
|
|
44
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = exports.padStartPonyfill = exports.padStartInvoker = void 0;
|
|
5
|
+
|
|
6
|
+
var _ramda = require("ramda");
|
|
7
|
+
|
|
8
|
+
var _isFunction = _interopRequireDefault(require("./isFunction"));
|
|
9
|
+
|
|
10
|
+
var _String = _interopRequireDefault(require("./internal/ponyfills/String.padStart"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var padStartInvoker = (0, _ramda.flip)((0, _ramda.invoker)(2, 'padStart'));
|
|
15
|
+
exports.padStartInvoker = padStartInvoker;
|
|
16
|
+
var padStartPonyfill = (0, _ramda.curry)(_String["default"]);
|
|
17
|
+
/**
|
|
18
|
+
* The function pads the current string with a given string
|
|
19
|
+
* (repeated, if needed) so that the resulting string reaches a given length.
|
|
20
|
+
* The padding is applied from the start of the current string.
|
|
21
|
+
*
|
|
22
|
+
* @func padCharsStart
|
|
23
|
+
* @memberOf RA
|
|
24
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
|
|
25
|
+
* @category String
|
|
26
|
+
* @sig String -> Number -> String -> String
|
|
27
|
+
* @param {string} padString The string to pad the current string with
|
|
28
|
+
* @param {number} targetLength The length of the resulting string once the current string has been padded
|
|
29
|
+
* @param {string} value String value to be padded
|
|
30
|
+
* @return {string} A new string of the specified length with the pad string on the start of current string
|
|
31
|
+
* @see {@link RA.padStart|padStart}, {@link RA.padEnd|padEnd}, {@link RA.padCharsEnd|padCharsEnd}
|
|
32
|
+
* @example
|
|
33
|
+
*
|
|
34
|
+
* RA.padCharsStart('-', 3, 'a'); // => '--a'
|
|
35
|
+
* RA.padCharsStart('foo', 10, 'abc'); // => 'foofoofabc'
|
|
36
|
+
* RA.padCharsStart('123456', 6, 'abc'); // => '123abc'
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
exports.padStartPonyfill = padStartPonyfill;
|
|
40
|
+
var padCharsStart = (0, _isFunction["default"])(String.prototype.padStart) ? padStartInvoker : padStartPonyfill;
|
|
41
|
+
var _default = padCharsStart;
|
|
42
|
+
exports["default"] = _default;
|
package/lib/padEnd.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _padCharsEnd = _interopRequireDefault(require("./padCharsEnd"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The function pads the current string with an empty string
|
|
12
|
+
* so that the resulting string reaches a given length.
|
|
13
|
+
* The padding is applied from the end of the current string.
|
|
14
|
+
*
|
|
15
|
+
* @func padEnd
|
|
16
|
+
* @memberOf RA
|
|
17
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
|
|
18
|
+
* @category String
|
|
19
|
+
* @sig Number -> String -> String
|
|
20
|
+
* @param {number} targetLength The length of the resulting string once
|
|
21
|
+
* the current string has been padded
|
|
22
|
+
* @param {string} value String value to be padded
|
|
23
|
+
* @return {string} A new string of the specified length with the pad string
|
|
24
|
+
* applied at the end of the current string
|
|
25
|
+
* @see {@link RA.padCharsEnd|padCharsEnd}, {@link RA.padCharsStart|padCharsStart}, {@link RA.padStart|padStart}
|
|
26
|
+
* @example
|
|
27
|
+
*
|
|
28
|
+
* RA.padEnd(3, 'a'); // => 'a '
|
|
29
|
+
*/
|
|
30
|
+
var padEnd = (0, _padCharsEnd["default"])(' ');
|
|
31
|
+
var _default = padEnd;
|
|
32
|
+
exports["default"] = _default;
|
package/lib/padStart.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _padCharsStart = _interopRequireDefault(require("./padCharsStart"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Pads string on the left side if it's shorter than length.
|
|
12
|
+
*
|
|
13
|
+
* @func padStart
|
|
14
|
+
* @memberOf RA
|
|
15
|
+
* @since {@link https://char0n.github.io/ramda-adjunct/2.25.0|v2.25.0}
|
|
16
|
+
* @category String
|
|
17
|
+
* @sig Number -> String -> String
|
|
18
|
+
* @param {number} targetLength The length of the resulting string once
|
|
19
|
+
* the current string has been padded
|
|
20
|
+
* @param {string} value String value to be padded
|
|
21
|
+
* @return {string} A new string of the specified length with the empty string
|
|
22
|
+
* applied to the beginning of the current string
|
|
23
|
+
* @see {@link RA.padCharsEnd|padCharsEnd}, {@link RA.padCharsStart|padCharsStart}, {@link RA.padEnd|padEnd}
|
|
24
|
+
* @example
|
|
25
|
+
*
|
|
26
|
+
* RA.padStart(3, 'a'); // => ' a'
|
|
27
|
+
*/
|
|
28
|
+
var padStart = (0, _padCharsStart["default"])(' ');
|
|
29
|
+
var _default = padStart;
|
|
30
|
+
exports["default"] = _default;
|