ramda-adjunct 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/dist/RA.node.js +163 -1571
- package/dist/RA.node.min.js +1 -1
- package/dist/RA.web.js +163 -1571
- package/dist/RA.web.min.js +1 -1
- package/dist/RA.web.standalone.js +164 -1571
- package/dist/RA.web.standalone.min.js +1 -1
- package/es/Y.js +1 -0
- package/es/allEqual.js +3 -2
- package/es/allEqualTo.js +1 -1
- package/es/allIdentical.js +1 -1
- package/es/allIdenticalTo.js +1 -1
- package/es/allP.js +1 -1
- package/es/allSettledP.js +1 -1
- package/es/allUnique.js +1 -1
- package/es/anyP.js +1 -1
- package/es/appendFlipped.js +1 -1
- package/es/argsPass.js +1 -1
- package/es/async.js +1 -5
- package/es/cata.js +1 -4
- package/es/catchP.js +1 -1
- package/es/ceil.js +1 -0
- package/es/compact.js +1 -1
- package/es/concatAll.js +1 -1
- package/es/concatRight.js +1 -1
- package/es/copyKeys.js +5 -5
- package/es/curryRight.js +1 -1
- package/es/curryRightN.js +1 -2
- package/es/defaultWhen.js +1 -1
- package/es/delayP.js +1 -3
- package/es/dispatch.js +1 -10
- package/es/divideNum.js +1 -1
- package/es/dropArgs.js +1 -1
- package/es/ensureArray.js +1 -1
- package/es/escapeRegExp.js +1 -1
- package/es/fantasy-land/Identity.js +15 -20
- package/es/fantasy-land/traits.js +4 -5
- package/es/fantasy-land/util.js +8 -4
- package/es/filterIndexed.js +1 -1
- package/es/findOr.js +1 -0
- package/es/flattenDepth.js +1 -12
- package/es/flattenPath.js +1 -1
- package/es/flattenProp.js +1 -1
- package/es/floor.js +1 -0
- package/es/fnull.js +1 -1
- package/es/inRange.js +1 -1
- package/es/included.js +1 -1
- package/es/index.js +18 -29
- package/es/internal/ap.js +0 -1
- package/es/internal/isOfTypeObject.js +0 -2
- package/es/internal/makeFlat.js +1 -6
- package/es/internal/ponyfills/Array.from.js +0 -12
- package/es/internal/ponyfills/Math.sign.js +0 -1
- package/es/internal/ponyfills/Math.trunc.js +2 -5
- package/es/internal/ponyfills/Number.isFinite.js +2 -1
- package/es/internal/ponyfills/Number.isNaN.js +2 -1
- package/es/internal/ponyfills/Promise.allSettled.js +0 -10
- package/es/internal/ponyfills/Promise.any.js +3 -31
- package/es/internal/ponyfills/String.padEnd.js +0 -6
- package/es/internal/ponyfills/String.padStart.js +4 -9
- package/es/internal/ponyfills/String.repeat.js +3 -13
- package/es/internal/ponyfills/String.replaceAll.js +0 -5
- package/es/invoke.js +1 -1
- package/es/invokeArgs.js +1 -0
- package/es/isArray.js +1 -1
- package/es/isArrayLike.js +2 -11
- package/es/isAsyncFunction.js +1 -1
- package/es/isBigInt.js +1 -1
- package/es/isBlank.js +0 -1
- package/es/isBoolean.js +1 -1
- package/es/isDate.js +1 -1
- package/es/isEmptyArray.js +1 -1
- package/es/isEmptyString.js +1 -1
- package/es/isError.js +1 -1
- package/es/isEven.js +1 -1
- package/es/isFalse.js +1 -0
- package/es/isFalsy.js +1 -1
- package/es/isFinite.js +1 -2
- package/es/isFloat.js +1 -1
- package/es/isFunction.js +1 -1
- package/es/isGeneratorFunction.js +2 -13
- package/es/isIndexed.js +1 -0
- package/es/isInteger.js +1 -1
- package/es/isInteger32.js +1 -1
- package/es/isIterable.js +1 -2
- package/es/isMap.js +1 -0
- package/es/isNaN.js +1 -2
- package/es/isNaturalNumber.js +1 -0
- package/es/isNegative.js +1 -1
- package/es/isNegativeZero.js +1 -1
- package/es/isNilOrEmpty.js +1 -1
- package/es/isNonEmptyArray.js +1 -1
- package/es/isNonEmptyString.js +1 -1
- package/es/isNonNegative.js +1 -1
- package/es/isNonPositive.js +1 -1
- package/es/isNotArray.js +1 -1
- package/es/isNotArrayLike.js +1 -1
- package/es/isNotAsyncFunction.js +1 -3
- package/es/isNotBoolean.js +1 -1
- package/es/isNotDate.js +1 -1
- package/es/isNotEmpty.js +1 -1
- package/es/isNotFinite.js +1 -1
- package/es/isNotFloat.js +1 -1
- package/es/isNotFunction.js +1 -3
- package/es/isNotGeneratorFunction.js +1 -3
- package/es/isNotInteger.js +1 -1
- package/es/isNotMap.js +1 -0
- package/es/isNotNaN.js +1 -1
- package/es/isNotNil.js +1 -1
- package/es/isNotNilOrEmpty.js +1 -1
- package/es/isNotNull.js +1 -1
- package/es/isNotNumber.js +1 -1
- package/es/isNotObj.js +1 -3
- package/es/isNotObjLike.js +1 -3
- package/es/isNotPair.js +1 -1
- package/es/isNotPlainObj.js +1 -3
- package/es/isNotPrimitive.js +1 -0
- package/es/isNotRegExp.js +1 -1
- package/es/isNotSet.js +1 -0
- package/es/isNotString.js +1 -1
- package/es/isNotUndefined.js +1 -1
- package/es/isNotValidDate.js +1 -1
- package/es/isNotValidNumber.js +1 -1
- package/es/isNull.js +1 -1
- package/es/isNumber.js +1 -1
- package/es/isObj.js +1 -3
- package/es/isObjLike.js +1 -3
- package/es/isOdd.js +1 -1
- package/es/isPair.js +1 -1
- package/es/isPlainObj.js +1 -6
- package/es/isPositive.js +1 -1
- package/es/isPositiveZero.js +1 -1
- package/es/isPrimitive.js +1 -0
- package/es/isPromise.js +1 -1
- package/es/isPrototypeOf.js +1 -1
- package/es/isRegExp.js +1 -1
- package/es/isSafeInteger.js +1 -0
- package/es/isSentinelValue.js +1 -1
- package/es/isSet.js +1 -0
- package/es/isSparseArray.js +1 -1
- package/es/isString.js +1 -1
- package/es/isSymbol.js +1 -2
- package/es/isThenable.js +1 -1
- package/es/isTrue.js +1 -0
- package/es/isTruthy.js +1 -1
- package/es/isUinteger32.js +1 -1
- package/es/isUndefined.js +1 -1
- package/es/isValidDate.js +1 -3
- package/es/isValidNumber.js +1 -1
- package/es/lastP.js +1 -9
- package/es/lengthEq.js +1 -1
- package/es/lengthGt.js +1 -1
- package/es/lengthGte.js +1 -1
- package/es/lengthLt.js +1 -1
- package/es/lengthLte.js +1 -1
- package/es/lengthNotEq.js +1 -1
- package/es/lensEq.js +1 -1
- package/es/lensIso.js +9 -8
- package/es/lensNotEq.js +1 -1
- package/es/lensNotSatisfy.js +1 -1
- package/es/lensSatisfies.js +1 -1
- package/es/lensTraverse.js +1 -1
- package/es/liftF.js +1 -1
- package/es/liftFN.js +1 -2
- package/es/list.js +1 -1
- package/es/mapIndexed.js +1 -1
- package/es/mergePath.js +1 -1
- package/es/mergePaths.js +1 -1
- package/es/mergeProp.js +1 -1
- package/es/mergeProps.js +1 -1
- package/es/move.js +1 -1
- package/es/nand.js +1 -1
- package/es/neither.js +1 -3
- package/es/noneP.js +1 -1
- package/es/nonePass.js +1 -1
- package/es/noop.js +1 -1
- package/es/nor.js +1 -1
- package/es/notAllPass.js +1 -1
- package/es/notAllUnique.js +1 -1
- package/es/notBoth.js +1 -3
- package/es/notEqual.js +1 -1
- package/es/omitBy.js +1 -3
- package/es/omitIndexes.js +3 -2
- package/es/overlaps.js +1 -1
- package/es/padCharsEnd.js +1 -1
- package/es/padCharsStart.js +1 -1
- package/es/padEnd.js +1 -1
- package/es/padStart.js +1 -1
- package/es/pathNotEq.js +1 -3
- package/es/pathOrLazy.js +1 -1
- package/es/paths.js +1 -1
- package/es/pickIndexes.js +3 -2
- package/es/propNotEq.js +1 -1
- package/es/rangeStep.js +1 -1
- package/es/reduceIndexed.js +1 -1
- package/es/reduceP.js +4 -16
- package/es/reduceRightP.js +6 -19
- package/es/rejectP.js +1 -1
- package/es/renameKeyWith.js +1 -1
- package/es/renameKeys.js +1 -4
- package/es/renameKeysWith.js +1 -1
- package/es/repeatStr.js +1 -1
- package/es/replaceAll.js +1 -1
- package/es/resolveP.js +1 -3
- package/es/round.js +1 -0
- package/es/seq.js +1 -2
- package/es/sign.js +1 -0
- package/es/skipTake.js +1 -0
- package/es/sliceFrom.js +1 -1
- package/es/sliceTo.js +1 -1
- package/es/sortByPaths.js +1 -0
- package/es/sortByProp.js +42 -0
- package/es/sortByProps.js +3 -11
- package/es/spreadPath.js +1 -1
- package/es/spreadProp.js +1 -1
- package/es/stubArray.js +1 -1
- package/es/stubNull.js +1 -1
- package/es/stubObj.js +1 -1
- package/es/stubString.js +1 -1
- package/es/stubUndefined.js +1 -1
- package/es/subtractNum.js +1 -1
- package/es/thenCatchP.js +1 -1
- package/es/toArray.js +1 -0
- package/es/toInteger32.js +0 -1
- package/es/toNumber.js +1 -1
- package/es/toUinteger32.js +2 -1
- package/es/trimCharsEnd.js +1 -0
- package/es/trimCharsStart.js +1 -0
- package/es/trimEnd.js +1 -0
- package/es/trimStart.js +1 -0
- package/es/trunc.js +1 -0
- package/es/unzipObjWith.js +1 -1
- package/es/viewOr.js +1 -0
- package/es/weave.js +1 -1
- package/es/weaveLazy.js +1 -1
- package/es/zipObjWith.js +1 -1
- package/lib/Y.js +1 -2
- package/lib/allEqual.js +0 -4
- package/lib/allEqualTo.js +0 -2
- package/lib/allIdentical.js +0 -4
- package/lib/allIdenticalTo.js +0 -2
- package/lib/allP.js +0 -2
- package/lib/allSettledP.js +1 -6
- package/lib/allUnique.js +0 -4
- package/lib/anyP.js +0 -10
- package/lib/appendFlipped.js +0 -2
- package/lib/argsPass.js +0 -5
- package/lib/async.js +0 -9
- package/lib/cata.js +0 -7
- package/lib/catchP.js +0 -2
- package/lib/ceil.js +1 -2
- package/lib/compact.js +0 -4
- package/lib/concatAll.js +1 -5
- package/lib/concatRight.js +0 -2
- package/lib/copyKeys.js +4 -8
- package/lib/curryRight.js +0 -4
- package/lib/curryRightN.js +0 -3
- package/lib/defaultWhen.js +0 -2
- package/lib/delayP.js +1 -8
- package/lib/dispatch.js +0 -15
- package/lib/divideNum.js +0 -2
- package/lib/dropArgs.js +0 -2
- package/lib/ensureArray.js +0 -4
- package/lib/escapeRegExp.js +0 -4
- package/lib/fantasy-land/Identity.js +14 -27
- package/lib/fantasy-land/traits.js +4 -28
- package/lib/fantasy-land/util.js +6 -5
- package/lib/filterIndexed.js +0 -2
- package/lib/findOr.js +1 -2
- package/lib/flattenDepth.js +1 -14
- package/lib/flattenPath.js +0 -2
- package/lib/flattenProp.js +0 -4
- package/lib/floor.js +1 -2
- package/lib/fnull.js +1 -6
- package/lib/inRange.js +1 -4
- package/lib/included.js +0 -2
- package/lib/index.js +4 -425
- package/lib/internal/ap.js +0 -9
- package/lib/internal/compareLength.js +0 -2
- package/lib/internal/isCoercible.js +0 -6
- package/lib/internal/isOfTypeObject.js +0 -3
- package/lib/internal/makeFlat.js +0 -8
- package/lib/internal/ponyfills/Array.from.js +0 -18
- package/lib/internal/ponyfills/Math.sign.js +0 -2
- package/lib/internal/ponyfills/Math.trunc.js +2 -7
- package/lib/internal/ponyfills/Number.isFinite.js +0 -4
- package/lib/internal/ponyfills/Number.isInteger.js +0 -4
- package/lib/internal/ponyfills/Number.isNaN.js +0 -4
- package/lib/internal/ponyfills/Number.isSafeInteger.js +0 -5
- package/lib/internal/ponyfills/Promise.allSettled.js +0 -14
- package/lib/internal/ponyfills/Promise.any.js +3 -36
- package/lib/internal/ponyfills/String.padEnd.js +0 -10
- package/lib/internal/ponyfills/String.padStart.js +4 -13
- package/lib/internal/ponyfills/String.repeat.js +3 -16
- package/lib/internal/ponyfills/String.replaceAll.js +0 -9
- package/lib/internal/ponyfills/String.trimEnd.js +0 -2
- package/lib/internal/ponyfills/String.trimStart.js +0 -2
- package/lib/invoke.js +0 -4
- package/lib/invokeArgs.js +1 -5
- package/lib/isArray.js +0 -4
- package/lib/isArrayLike.js +0 -16
- package/lib/isAsyncFunction.js +0 -2
- package/lib/isBigInt.js +0 -2
- package/lib/isBlank.js +0 -4
- package/lib/isBoolean.js +0 -2
- package/lib/isDate.js +0 -2
- package/lib/isEmptyArray.js +0 -4
- package/lib/isEmptyString.js +0 -2
- package/lib/isError.js +0 -2
- package/lib/isEven.js +0 -5
- package/lib/isFalse.js +1 -2
- package/lib/isFalsy.js +0 -4
- package/lib/isFinite.js +1 -8
- package/lib/isFloat.js +0 -5
- package/lib/isFunction.js +0 -5
- package/lib/isGeneratorFunction.js +1 -15
- package/lib/isIndexed.js +1 -5
- package/lib/isInteger.js +1 -6
- package/lib/isInteger32.js +0 -4
- package/lib/isIterable.js +0 -5
- package/lib/isMap.js +1 -2
- package/lib/isNaN.js +1 -8
- package/lib/isNaturalNumber.js +1 -5
- package/lib/isNegative.js +0 -4
- package/lib/isNegativeZero.js +0 -2
- package/lib/isNilOrEmpty.js +0 -2
- package/lib/isNonEmptyArray.js +0 -5
- package/lib/isNonEmptyString.js +0 -6
- package/lib/isNonNegative.js +0 -4
- package/lib/isNonPositive.js +0 -4
- package/lib/isNotArray.js +0 -4
- package/lib/isNotArrayLike.js +0 -4
- package/lib/isNotAsyncFunction.js +0 -6
- package/lib/isNotBoolean.js +0 -4
- package/lib/isNotDate.js +0 -4
- package/lib/isNotEmpty.js +0 -2
- package/lib/isNotFinite.js +0 -4
- package/lib/isNotFloat.js +0 -4
- package/lib/isNotFunction.js +0 -6
- package/lib/isNotGeneratorFunction.js +0 -6
- package/lib/isNotInteger.js +0 -4
- package/lib/isNotMap.js +1 -4
- package/lib/isNotNaN.js +0 -4
- package/lib/isNotNil.js +0 -2
- package/lib/isNotNilOrEmpty.js +0 -4
- package/lib/isNotNull.js +0 -4
- package/lib/isNotNumber.js +0 -4
- package/lib/isNotObj.js +0 -6
- package/lib/isNotObjLike.js +0 -6
- package/lib/isNotPair.js +0 -4
- package/lib/isNotPlainObj.js +0 -6
- package/lib/isNotPrimitive.js +1 -4
- package/lib/isNotRegExp.js +0 -4
- package/lib/isNotSet.js +1 -4
- package/lib/isNotString.js +0 -4
- package/lib/isNotUndefined.js +0 -4
- package/lib/isNotValidDate.js +0 -4
- package/lib/isNotValidNumber.js +0 -4
- package/lib/isNull.js +0 -2
- package/lib/isNumber.js +0 -2
- package/lib/isObj.js +0 -8
- package/lib/isObjLike.js +0 -7
- package/lib/isOdd.js +0 -4
- package/lib/isPair.js +0 -4
- package/lib/isPlainObj.js +1 -12
- package/lib/isPositive.js +0 -4
- package/lib/isPositiveZero.js +0 -2
- package/lib/isPrimitive.js +1 -11
- package/lib/isPromise.js +0 -4
- package/lib/isPrototypeOf.js +0 -4
- package/lib/isRegExp.js +0 -2
- package/lib/isSafeInteger.js +1 -6
- package/lib/isSentinelValue.js +0 -4
- package/lib/isSet.js +1 -2
- package/lib/isSparseArray.js +0 -4
- package/lib/isString.js +0 -2
- package/lib/isSymbol.js +0 -3
- package/lib/isThenable.js +0 -4
- package/lib/isTrue.js +1 -2
- package/lib/isTruthy.js +0 -2
- package/lib/isUinteger32.js +0 -4
- package/lib/isUndefined.js +0 -4
- package/lib/isValidDate.js +0 -7
- package/lib/isValidNumber.js +0 -5
- package/lib/lastP.js +0 -16
- package/lib/lengthEq.js +0 -4
- package/lib/lengthGt.js +0 -4
- package/lib/lengthGte.js +0 -4
- package/lib/lengthLt.js +0 -4
- package/lib/lengthLte.js +0 -4
- package/lib/lengthNotEq.js +0 -4
- package/lib/lensEq.js +0 -2
- package/lib/lensIso.js +6 -8
- package/lib/lensNotEq.js +0 -4
- package/lib/lensNotSatisfy.js +0 -4
- package/lib/lensSatisfies.js +0 -4
- package/lib/lensTraverse.js +0 -4
- package/lib/liftF.js +0 -4
- package/lib/liftFN.js +0 -5
- package/lib/list.js +0 -2
- package/lib/mapIndexed.js +0 -2
- package/lib/mergePath.js +0 -2
- package/lib/mergePaths.js +0 -4
- package/lib/mergeProp.js +0 -4
- package/lib/mergeProps.js +0 -2
- package/lib/move.js +0 -2
- package/lib/nand.js +0 -3
- package/lib/neither.js +0 -4
- package/lib/noneP.js +0 -6
- package/lib/nonePass.js +0 -2
- package/lib/noop.js +0 -4
- package/lib/nor.js +0 -3
- package/lib/notAllPass.js +0 -2
- package/lib/notAllUnique.js +0 -4
- package/lib/notBoth.js +0 -4
- package/lib/notEqual.js +0 -2
- package/lib/omitBy.js +0 -4
- package/lib/omitIndexes.js +1 -3
- package/lib/overlaps.js +1 -5
- package/lib/padCharsEnd.js +1 -6
- package/lib/padCharsStart.js +1 -6
- package/lib/padEnd.js +0 -3
- package/lib/padStart.js +0 -3
- package/lib/pathNotEq.js +0 -4
- package/lib/pathOrLazy.js +0 -2
- package/lib/paths.js +0 -2
- package/lib/pickIndexes.js +1 -3
- package/lib/propNotEq.js +0 -2
- package/lib/rangeStep.js +0 -4
- package/lib/reduceIndexed.js +0 -2
- package/lib/reduceP.js +3 -21
- package/lib/reduceRightP.js +4 -24
- package/lib/rejectP.js +0 -2
- package/lib/renameKeyWith.js +0 -4
- package/lib/renameKeys.js +1 -7
- package/lib/renameKeysWith.js +0 -2
- package/lib/repeatStr.js +1 -6
- package/lib/replaceAll.js +1 -6
- package/lib/resolveP.js +0 -4
- package/lib/round.js +1 -2
- package/lib/seq.js +1 -4
- package/lib/sign.js +1 -6
- package/lib/skipTake.js +1 -2
- package/lib/sliceFrom.js +0 -2
- package/lib/sliceTo.js +0 -2
- package/lib/sortByPaths.js +1 -2
- package/lib/sortByProp.js +47 -0
- package/lib/sortByProps.js +3 -13
- package/lib/spreadPath.js +0 -2
- package/lib/spreadProp.js +0 -4
- package/lib/stubArray.js +1 -2
- package/lib/stubNull.js +0 -2
- package/lib/stubObj.js +1 -2
- package/lib/stubString.js +0 -2
- package/lib/stubUndefined.js +0 -3
- package/lib/subtractNum.js +0 -2
- package/lib/thenCatchP.js +0 -2
- package/lib/toArray.js +1 -6
- package/lib/toInteger32.js +0 -2
- package/lib/toNumber.js +0 -4
- package/lib/toUinteger32.js +1 -2
- package/lib/trimCharsEnd.js +1 -4
- package/lib/trimCharsStart.js +1 -4
- package/lib/trimEnd.js +1 -6
- package/lib/trimStart.js +1 -6
- package/lib/trunc.js +1 -6
- package/lib/unzipObjWith.js +0 -4
- package/lib/viewOr.js +1 -2
- package/lib/weave.js +0 -2
- package/lib/weaveLazy.js +0 -2
- package/lib/zipObjWith.js +0 -2
- package/package.json +30 -28
- package/src/index.js +1 -0
- package/src/isGeneratorFunction.js +2 -19
- package/src/sortByProp.js +45 -0
- package/src/sortByProps.js +1 -1
- package/types/.eslintrc.js +23 -0
- package/types/dtslint.eslint.js +13 -0
- package/types/index.d.ts +24 -5
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { both } from 'ramda';
|
|
2
|
-
import isNumber from '../../isNumber';
|
|
2
|
+
import isNumber from '../../isNumber';
|
|
3
3
|
|
|
4
|
+
// eslint-disable-next-line no-restricted-globals
|
|
4
5
|
var isFinitePonyfill = both(isNumber, isFinite);
|
|
5
6
|
export default isFinitePonyfill;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { both } from 'ramda';
|
|
2
|
-
import isNumber from '../../isNumber';
|
|
2
|
+
import isNumber from '../../isNumber';
|
|
3
3
|
|
|
4
|
+
// eslint-disable-next-line no-restricted-globals
|
|
4
5
|
var isNaNPonyfill = both(isNumber, isNaN);
|
|
5
6
|
export default isNaNPonyfill;
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
|
|
3
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
|
|
7
4
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
-
|
|
9
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
-
|
|
11
6
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
|
-
|
|
13
7
|
import { map } from 'ramda';
|
|
14
8
|
import allP from '../../allP';
|
|
15
9
|
import resolveP from '../../resolveP';
|
|
16
|
-
|
|
17
10
|
var onFulfill = function onFulfill(value) {
|
|
18
11
|
return {
|
|
19
12
|
status: 'fulfilled',
|
|
20
13
|
value: value
|
|
21
14
|
};
|
|
22
15
|
};
|
|
23
|
-
|
|
24
16
|
var onReject = function onReject(reason) {
|
|
25
17
|
return {
|
|
26
18
|
status: 'rejected',
|
|
27
19
|
reason: reason
|
|
28
20
|
};
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
var allSettledPonyfill = function allSettledPonyfill(iterable) {
|
|
32
23
|
var array = map(function (p) {
|
|
33
24
|
return resolveP(p).then(onFulfill)["catch"](onReject);
|
|
34
25
|
}, _toConsumableArray(iterable));
|
|
35
26
|
return allP(array);
|
|
36
27
|
};
|
|
37
|
-
|
|
38
28
|
export default allSettledPonyfill;
|
|
@@ -1,81 +1,53 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
|
|
3
2
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
-
|
|
5
3
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
|
|
7
4
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
|
|
9
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
-
|
|
11
6
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
-
|
|
13
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
-
|
|
15
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
16
|
-
|
|
8
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
-
|
|
10
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
11
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20
|
-
|
|
21
13
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
22
|
-
|
|
23
14
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
24
|
-
|
|
25
15
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
26
|
-
|
|
27
16
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
28
|
-
|
|
29
17
|
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
30
|
-
|
|
31
18
|
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
32
|
-
|
|
33
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
34
|
-
|
|
35
20
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
36
|
-
|
|
37
21
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
38
|
-
|
|
39
22
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
40
|
-
|
|
41
23
|
import { map } from 'ramda';
|
|
42
24
|
import resolveP from '../../resolveP';
|
|
43
25
|
export var AggregatedError = /*#__PURE__*/function (_Error) {
|
|
44
26
|
_inherits(AggregatedError, _Error);
|
|
45
|
-
|
|
46
27
|
var _super = _createSuper(AggregatedError);
|
|
47
|
-
|
|
48
28
|
function AggregatedError() {
|
|
49
29
|
var _this;
|
|
50
|
-
|
|
51
30
|
var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
52
31
|
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
53
|
-
|
|
54
32
|
_classCallCheck(this, AggregatedError);
|
|
55
|
-
|
|
56
33
|
_this = _super.call(this, message);
|
|
57
34
|
_this.errors = errors;
|
|
58
35
|
return _this;
|
|
59
36
|
}
|
|
60
|
-
|
|
61
37
|
return _createClass(AggregatedError);
|
|
62
38
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
63
|
-
|
|
64
39
|
var anyPonyfill = function anyPonyfill(iterable) {
|
|
65
40
|
var exceptions = [];
|
|
66
41
|
return new Promise(function (resolve, reject) {
|
|
67
42
|
var onReject = function onReject(e) {
|
|
68
43
|
exceptions.push(e);
|
|
69
|
-
|
|
70
44
|
if (exceptions.length === iterable.length) {
|
|
71
45
|
reject(new AggregatedError(exceptions));
|
|
72
46
|
}
|
|
73
47
|
};
|
|
74
|
-
|
|
75
48
|
map(function (p) {
|
|
76
49
|
return resolveP(p).then(resolve)["catch"](onReject);
|
|
77
50
|
}, _toConsumableArray(iterable));
|
|
78
51
|
});
|
|
79
52
|
};
|
|
80
|
-
|
|
81
53
|
export default anyPonyfill;
|
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
import isFunction from '../../isFunction';
|
|
2
2
|
import isNotUndefined from '../../isNotUndefined';
|
|
3
3
|
import repeat from './String.repeat';
|
|
4
|
-
|
|
5
4
|
var padEndPonyfill = function padEndPonyfill(padString, targetLength, value) {
|
|
6
5
|
// eslint-disable-next-line no-bitwise
|
|
7
6
|
var finalLength = targetLength >> 0;
|
|
8
7
|
var finalPadString = String(isNotUndefined(padString) ? padString : ' ');
|
|
9
|
-
|
|
10
8
|
if (value.length > finalLength) {
|
|
11
9
|
return String(value);
|
|
12
10
|
}
|
|
13
|
-
|
|
14
11
|
finalLength -= value.length;
|
|
15
|
-
|
|
16
12
|
if (finalLength > finalPadString.length) {
|
|
17
13
|
var remainingLength = finalLength / finalPadString.length;
|
|
18
14
|
finalPadString += isFunction(String.prototype.repeat) ? finalPadString.repeat(remainingLength) : repeat(finalPadString, remainingLength);
|
|
19
15
|
}
|
|
20
|
-
|
|
21
16
|
return String(value) + finalPadString.slice(0, finalLength);
|
|
22
17
|
};
|
|
23
|
-
|
|
24
18
|
export default padEndPonyfill;
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import isFunction from '../../isFunction';
|
|
2
2
|
import isNotUndefined from '../../isNotUndefined';
|
|
3
3
|
import repeat from './String.repeat';
|
|
4
|
-
|
|
5
4
|
var padStartPonyfill = function padStartPonyfill(padString, targetLength, value) {
|
|
6
5
|
// eslint-disable-next-line no-bitwise
|
|
7
6
|
var finalLength = targetLength >> 0; // truncate if number, or convert non-number to 0;
|
|
7
|
+
var finalPadString = String(isNotUndefined(padString) ? padString : ' ');
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
// return the original string, if targeted length is less than original strings length
|
|
11
10
|
if (value.length >= finalLength) {
|
|
12
11
|
return String(value);
|
|
13
12
|
}
|
|
14
|
-
|
|
15
13
|
finalLength -= value.length;
|
|
16
|
-
|
|
17
14
|
if (finalLength > finalPadString.length) {
|
|
18
|
-
var lenghtToPad = finalLength / finalPadString.length;
|
|
19
|
-
|
|
15
|
+
var lenghtToPad = finalLength / finalPadString.length;
|
|
16
|
+
// append to original to ensure we are longer than needed
|
|
20
17
|
finalPadString += isFunction(String.prototype.repeat) ? finalPadString.repeat(lenghtToPad) : repeat(finalPadString, lenghtToPad);
|
|
21
18
|
}
|
|
22
|
-
|
|
23
19
|
return finalPadString.slice(0, finalLength) + String(value);
|
|
24
20
|
};
|
|
25
|
-
|
|
26
21
|
export default padStartPonyfill;
|
|
@@ -1,46 +1,36 @@
|
|
|
1
1
|
import isNotFinite from '../../isNotFinite';
|
|
2
2
|
import isNegative from '../../isNegative';
|
|
3
|
-
|
|
4
3
|
var repeat = function repeat(value, count) {
|
|
5
4
|
var validCount = Number(count);
|
|
6
|
-
|
|
7
5
|
if (validCount !== count) {
|
|
8
6
|
validCount = 0;
|
|
9
7
|
}
|
|
10
|
-
|
|
11
8
|
if (isNegative(validCount)) {
|
|
12
9
|
throw new RangeError('repeat count must be non-negative');
|
|
13
10
|
}
|
|
14
|
-
|
|
15
11
|
if (isNotFinite(validCount)) {
|
|
16
12
|
throw new RangeError('repeat count must be less than infinity');
|
|
17
13
|
}
|
|
18
|
-
|
|
19
14
|
validCount = Math.floor(validCount);
|
|
20
|
-
|
|
21
15
|
if (value.length === 0 || validCount === 0) {
|
|
22
16
|
return '';
|
|
23
|
-
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Ensuring validCount is a 31-bit integer allows us to heavily optimize the
|
|
24
20
|
// main part. But anyway, most current (August 2014) browsers can't handle
|
|
25
21
|
// strings 1 << 28 chars or longer, so:
|
|
26
22
|
// eslint-disable-next-line no-bitwise
|
|
27
|
-
|
|
28
|
-
|
|
29
23
|
if (value.length * validCount >= 1 << 28) {
|
|
30
24
|
throw new RangeError('repeat count must not overflow maximum string size');
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
var maxCount = value.length * validCount;
|
|
34
27
|
validCount = Math.floor(Math.log(validCount) / Math.log(2));
|
|
35
28
|
var result = value;
|
|
36
|
-
|
|
37
29
|
while (validCount) {
|
|
38
30
|
result += value;
|
|
39
31
|
validCount -= 1;
|
|
40
32
|
}
|
|
41
|
-
|
|
42
33
|
result += result.substring(0, maxCount - result.length);
|
|
43
34
|
return result;
|
|
44
35
|
};
|
|
45
|
-
|
|
46
36
|
export default repeat;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { replace } from 'ramda';
|
|
2
2
|
import isRegExp from '../../isRegExp';
|
|
3
3
|
import escapeRegExp from '../../escapeRegExp';
|
|
4
|
-
|
|
5
4
|
var checkArguments = function checkArguments(searchValue, replaceValue, str) {
|
|
6
5
|
if (str == null || searchValue == null || replaceValue == null) {
|
|
7
6
|
throw TypeError('Input values must not be `null` or `undefined`');
|
|
8
7
|
}
|
|
9
8
|
};
|
|
10
|
-
|
|
11
9
|
var checkValue = function checkValue(value, valueName) {
|
|
12
10
|
if (typeof value !== 'string') {
|
|
13
11
|
if (!(value instanceof String)) {
|
|
@@ -15,13 +13,11 @@ var checkValue = function checkValue(value, valueName) {
|
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
};
|
|
18
|
-
|
|
19
16
|
var checkSearchValue = function checkSearchValue(searchValue) {
|
|
20
17
|
if (typeof searchValue !== 'string' && !(searchValue instanceof String) && !(searchValue instanceof RegExp)) {
|
|
21
18
|
throw TypeError('`searchValue` must be a string or an regexp');
|
|
22
19
|
}
|
|
23
20
|
};
|
|
24
|
-
|
|
25
21
|
var replaceAll = function replaceAll(searchValue, replaceValue, str) {
|
|
26
22
|
checkArguments(searchValue, replaceValue, str);
|
|
27
23
|
checkValue(str, 'str');
|
|
@@ -30,5 +26,4 @@ var replaceAll = function replaceAll(searchValue, replaceValue, str) {
|
|
|
30
26
|
var regexp = new RegExp(isRegExp(searchValue) ? searchValue : escapeRegExp(searchValue), 'g');
|
|
31
27
|
return replace(regexp, replaceValue, str);
|
|
32
28
|
};
|
|
33
|
-
|
|
34
29
|
export default replaceAll;
|
package/es/invoke.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __ } from 'ramda';
|
|
2
2
|
import invokeArgs from './invokeArgs';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* Invokes the method at path of object.
|
|
5
6
|
*
|
|
@@ -15,6 +16,5 @@ import invokeArgs from './invokeArgs';
|
|
|
15
16
|
*
|
|
16
17
|
* RA.invoke(['random'], Math); //=> 0.5113253820009047
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
19
|
var invoke = invokeArgs(__, [], __);
|
|
20
20
|
export default invoke;
|
package/es/invokeArgs.js
CHANGED
package/es/isArray.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { curryN, pipe, type, identical } from 'ramda';
|
|
2
2
|
import isFunction from './isFunction';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* Checks if input value is `Array`.
|
|
5
6
|
*
|
|
@@ -17,6 +18,5 @@ import isFunction from './isFunction';
|
|
|
17
18
|
* RA.isArray(null); //=> false
|
|
18
19
|
* RA.isArray({}); //=> false
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
21
|
var isArray = curryN(1, isFunction(Array.isArray) ? Array.isArray : pipe(type, identical('Array')));
|
|
22
22
|
export default isArray;
|
package/es/isArrayLike.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
|
|
3
2
|
import { has, curryN } from 'ramda';
|
|
4
3
|
import isArray from './isArray';
|
|
5
4
|
import isString from './isString';
|
|
6
|
-
/* eslint-disable max-len */
|
|
7
5
|
|
|
6
|
+
/* eslint-disable max-len */
|
|
8
7
|
/**
|
|
9
8
|
* Tests whether or not an object is similar to an array.
|
|
10
9
|
*
|
|
@@ -27,41 +26,33 @@ import isString from './isString';
|
|
|
27
26
|
* RA.isArrayLike({length: 10}); //=> false
|
|
28
27
|
* RA.isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true
|
|
29
28
|
*/
|
|
30
|
-
|
|
31
29
|
/* eslint-enable max-len */
|
|
32
|
-
|
|
33
30
|
var isArrayLike = curryN(1, function (val) {
|
|
34
31
|
if (isArray(val)) {
|
|
35
32
|
return true;
|
|
36
33
|
}
|
|
37
|
-
|
|
38
34
|
if (!val) {
|
|
39
35
|
return false;
|
|
40
36
|
}
|
|
41
|
-
|
|
42
37
|
if (isString(val)) {
|
|
43
38
|
return false;
|
|
44
39
|
}
|
|
45
|
-
|
|
46
40
|
if (_typeof(val) !== 'object') {
|
|
47
41
|
return false;
|
|
48
42
|
}
|
|
49
|
-
|
|
50
43
|
if (val.nodeType === 1) {
|
|
51
44
|
return !!val.length;
|
|
52
45
|
}
|
|
53
|
-
|
|
54
46
|
if (val.length === 0) {
|
|
55
47
|
return true;
|
|
56
48
|
}
|
|
57
|
-
|
|
58
49
|
if (val.length > 0) {
|
|
59
50
|
return has(0, val) && has(val.length - 1, val);
|
|
60
51
|
}
|
|
61
|
-
|
|
62
52
|
return false;
|
|
63
53
|
});
|
|
64
54
|
export default isArrayLike;
|
|
55
|
+
|
|
65
56
|
/**
|
|
66
57
|
The MIT License (MIT)
|
|
67
58
|
|
package/es/isAsyncFunction.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { pipe, type, identical, curryN } from 'ramda';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Checks if input value is `Async Function`.
|
|
4
5
|
*
|
|
@@ -17,6 +18,5 @@ import { pipe, type, identical, curryN } from 'ramda';
|
|
|
17
18
|
* RA.isAsyncFunction(function test() { }); //=> false
|
|
18
19
|
* RA.isAsyncFunction(() => {}); //=> false
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
21
|
var isAsyncFunction = curryN(1, pipe(type, identical('AsyncFunction')));
|
|
22
22
|
export default isAsyncFunction;
|
package/es/isBigInt.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type, pipe, identical, curryN } from 'ramda';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Checks if value is a BigInt.
|
|
4
5
|
*
|
|
@@ -18,6 +19,5 @@ import { type, pipe, identical, curryN } from 'ramda';
|
|
|
18
19
|
* RA.isBigInt(10n); // => true
|
|
19
20
|
* RA.isBigInt(BitInt(9007199254740991)); // => true
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
22
|
var isBigInt = curryN(1, pipe(type, identical('BigInt')));
|
|
23
23
|
export default isBigInt;
|
package/es/isBlank.js
CHANGED
package/es/isBoolean.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type, identical, pipe, curryN } from 'ramda';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Checks if input value is `Boolean`.
|
|
4
5
|
*
|
|
@@ -16,6 +17,5 @@ import { type, identical, pipe, curryN } from 'ramda';
|
|
|
16
17
|
* RA.isBoolean(true); //=> true
|
|
17
18
|
* RA.isBoolean(null); //=> false
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
20
|
var isBoolean = curryN(1, pipe(type, identical('Boolean')));
|
|
21
21
|
export default isBoolean;
|
package/es/isDate.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type, identical, pipe, curryN } from 'ramda';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Checks if value is `Date` object.
|
|
4
5
|
*
|
|
@@ -15,6 +16,5 @@ import { type, identical, pipe, curryN } from 'ramda';
|
|
|
15
16
|
* RA.isDate(new Date()); //=> true
|
|
16
17
|
* RA.isDate('1997-07-16T19:20+01:00'); //=> false
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
19
|
var isDate = curryN(1, pipe(type, identical('Date')));
|
|
20
20
|
export default isDate;
|
package/es/isEmptyArray.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { both, isEmpty } from 'ramda';
|
|
2
2
|
import isArray from './isArray';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* Checks if input value is an empty `Array`.
|
|
5
6
|
*
|
|
@@ -21,6 +22,5 @@ import isArray from './isArray';
|
|
|
21
22
|
* RA.isEmptyArray(42); // => false
|
|
22
23
|
* RA.isEmptyArray('42'); // => false
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
25
|
var isEmptyArray = both(isArray, isEmpty);
|
|
26
26
|
export default isEmptyArray;
|
package/es/isEmptyString.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { equals } from 'ramda';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Checks if input value is an empty `String`.
|
|
4
5
|
*
|
|
@@ -22,6 +23,5 @@ import { equals } from 'ramda';
|
|
|
22
23
|
* RA.isEmptyString(undefined); // => false
|
|
23
24
|
* RA.isEmptyString(42); // => false
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
26
|
var isEmptyString = equals('');
|
|
27
27
|
export default isEmptyString;
|
package/es/isError.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type, identical, pipe, curryN } from 'ramda';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError` or `URIError` object.
|
|
4
5
|
*
|
|
@@ -15,6 +16,5 @@ import { type, identical, pipe, curryN } from 'ramda';
|
|
|
15
16
|
* RA.isError(Error); //=> false
|
|
16
17
|
* RA.isError(1); // => false
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
19
|
var isError = curryN(1, pipe(type, identical('Error')));
|
|
20
20
|
export default isError;
|
package/es/isEven.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { both, complement, curryN } from 'ramda';
|
|
2
2
|
import isInteger from './isInteger';
|
|
3
3
|
import isOdd from './isOdd';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* Checks if value is even integer number.
|
|
6
7
|
* An even number is an integer which is "evenly divisible" by two.
|
|
@@ -24,6 +25,5 @@ import isOdd from './isOdd';
|
|
|
24
25
|
* RA.isEven(4); // => true
|
|
25
26
|
* RA.isEven(3); // => false
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
28
|
var isEven = curryN(1, both(isInteger, complement(isOdd)));
|
|
29
29
|
export default isEven;
|
package/es/isFalse.js
CHANGED
package/es/isFalsy.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { complement } from 'ramda';
|
|
2
2
|
import isTruthy from './isTruthy';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* A falsy value is a value that translates to false when evaluated in a Boolean context.
|
|
5
6
|
* Falsy values are `false`, `0`, `""`, `null`, `undefined`, and `NaN`.
|
|
@@ -21,6 +22,5 @@ import isTruthy from './isTruthy';
|
|
|
21
22
|
* RA.isFalsy(undefined); // => true
|
|
22
23
|
* RA.isFalsy(NaN); // => true
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
25
|
var isFalsy = complement(isTruthy);
|
|
26
26
|
export default isFalsy;
|
package/es/isFinite.js
CHANGED
|
@@ -2,6 +2,7 @@ import { bind, curryN } from 'ramda';
|
|
|
2
2
|
import isFunction from './isFunction';
|
|
3
3
|
import ponyfill from './internal/ponyfills/Number.isFinite';
|
|
4
4
|
export var isFinitePonyfill = curryN(1, ponyfill);
|
|
5
|
+
|
|
5
6
|
/**
|
|
6
7
|
* Checks whether the passed value is a finite `Number`.
|
|
7
8
|
*
|
|
@@ -27,7 +28,5 @@ export var isFinitePonyfill = curryN(1, ponyfill);
|
|
|
27
28
|
* RA.isFinite(null); // => false
|
|
28
29
|
* // would've been true with global isFinite(null)
|
|
29
30
|
*/
|
|
30
|
-
|
|
31
31
|
var _isFinite = isFunction(Number.isFinite) ? curryN(1, bind(Number.isFinite, Number)) : isFinitePonyfill;
|
|
32
|
-
|
|
33
32
|
export default _isFinite;
|
package/es/isFloat.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { complement, both } from 'ramda';
|
|
2
2
|
import isInteger from './isInteger';
|
|
3
3
|
import isFinite from './isFinite';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* Checks whether the passed value is a `float`.
|
|
6
7
|
*
|
|
@@ -29,6 +30,5 @@ import isFinite from './isFinite';
|
|
|
29
30
|
* RA.isFloat(false); //=> false
|
|
30
31
|
* RA.isFloat([1]); //=> false
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
33
|
var isFloat = both(isFinite, complement(isInteger));
|
|
34
34
|
export default isFloat;
|
package/es/isFunction.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { anyPass, type, pipe, identical } from 'ramda';
|
|
2
2
|
import isGeneratorFunction from './isGeneratorFunction';
|
|
3
3
|
import isAsyncFunction from './isAsyncFunction';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* Checks if input value is `Function`.
|
|
6
7
|
*
|
|
@@ -21,6 +22,5 @@ import isAsyncFunction from './isAsyncFunction';
|
|
|
21
22
|
* RA.isFunction(null); //=> false
|
|
22
23
|
* RA.isFunction('abc'); //=> false
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
25
|
var isFunction = anyPass([pipe(type, identical('Function')), isGeneratorFunction, isAsyncFunction]);
|
|
26
26
|
export default isFunction;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import { type,
|
|
2
|
-
var GeneratorFunction = null;
|
|
3
|
-
var legacyCheck = null;
|
|
1
|
+
import { type, identical, pipe, curryN } from 'ramda';
|
|
4
2
|
|
|
5
|
-
try {
|
|
6
|
-
GeneratorFunction = new Function('return function* () {}')().constructor; // eslint-disable-line no-new-func
|
|
7
|
-
|
|
8
|
-
legacyCheck = is(GeneratorFunction);
|
|
9
|
-
} catch (e) {
|
|
10
|
-
legacyCheck = stubFalse;
|
|
11
|
-
}
|
|
12
3
|
/**
|
|
13
4
|
* Checks if input value is `Generator Function`.
|
|
14
5
|
*
|
|
@@ -27,7 +18,5 @@ try {
|
|
|
27
18
|
* RA.isGeneratorFunction(function test() { }); //=> false
|
|
28
19
|
* RA.isGeneratorFunction(() => {}); //=> false
|
|
29
20
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var isGeneratorFunction = curryN(1, either(pipe(type, identical('GeneratorFunction')), legacyCheck));
|
|
21
|
+
var isGeneratorFunction = curryN(1, pipe(type, identical('GeneratorFunction')));
|
|
33
22
|
export default isGeneratorFunction;
|
package/es/isIndexed.js
CHANGED
package/es/isInteger.js
CHANGED
|
@@ -2,6 +2,7 @@ import { bind, curryN } from 'ramda';
|
|
|
2
2
|
import isFunction from './isFunction';
|
|
3
3
|
import ponyfill from './internal/ponyfills/Number.isInteger';
|
|
4
4
|
export var isIntegerPonyfill = curryN(1, ponyfill);
|
|
5
|
+
|
|
5
6
|
/**
|
|
6
7
|
* Checks whether the passed value is an `integer`.
|
|
7
8
|
*
|
|
@@ -30,6 +31,5 @@ export var isIntegerPonyfill = curryN(1, ponyfill);
|
|
|
30
31
|
* RA.isInteger(false); //=> false
|
|
31
32
|
* RA.isInteger([1]); //=> false
|
|
32
33
|
*/
|
|
33
|
-
|
|
34
34
|
var isInteger = isFunction(Number.isInteger) ? curryN(1, bind(Number.isInteger, Number)) : isIntegerPonyfill;
|
|
35
35
|
export default isInteger;
|
package/es/isInteger32.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { curryN } from 'ramda';
|
|
2
2
|
import toInteger32 from './toInteger32';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* Checks whether the passed value is a signed 32 bit integer.
|
|
5
6
|
*
|
|
@@ -21,7 +22,6 @@ import toInteger32 from './toInteger32';
|
|
|
21
22
|
* RA.isInteger32(NaN); //=> false
|
|
22
23
|
* RA.isInteger32(2 ** 31); //=> false
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
25
|
var isInteger32 = curryN(1, function (val) {
|
|
26
26
|
return toInteger32(val) === val;
|
|
27
27
|
});
|
package/es/isIterable.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { hasIn, curryN } from 'ramda';
|
|
2
2
|
import isFunction from './isFunction';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* Checks whether the passed value is iterable.
|
|
5
6
|
*
|
|
@@ -22,12 +23,10 @@ import isFunction from './isFunction';
|
|
|
22
23
|
* RA.isIterable(null); //=> false
|
|
23
24
|
* RA.isIterable(undefined); //=> false
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
26
|
var isIterable = curryN(1, function (val) {
|
|
27
27
|
if (typeof Symbol === 'undefined') {
|
|
28
28
|
return false;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
30
|
return hasIn(Symbol.iterator, Object(val)) && isFunction(val[Symbol.iterator]);
|
|
32
31
|
});
|
|
33
32
|
export default isIterable;
|