Comparing version 6.5.2 to 6.5.3
@@ -0,1 +1,7 @@ | ||
6.5.3 | ||
- Wrong logic where `R.without` use `R.includes` while it should use the array version of `R.includes` | ||
This is Ramda bug, that Rambda also has before this release - https://github.com/ramda/ramda/issues/3086 | ||
6.5.2 | ||
@@ -2,0 +8,0 @@ |
@@ -615,2 +615,13 @@ function F() { | ||
function includesArray(valueToFind, input) { | ||
let index = -1; | ||
while (++index < input.length) { | ||
if (equals(input[index], valueToFind)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
function includes(valueToFind, input) { | ||
@@ -628,11 +639,3 @@ if (arguments.length === 1) return _input => includes(valueToFind, _input); | ||
if (!_isArray(input)) return false; | ||
let index = -1; | ||
while (++index < input.length) { | ||
if (equals(input[index], valueToFind)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
return includesArray(valueToFind, input); | ||
} | ||
@@ -2125,3 +2128,3 @@ | ||
return reduce((prev, current) => includes(current, matchAgainst) ? prev : prev.concat(current), [], source); | ||
return reduce((prev, current) => includesArray(current, matchAgainst) ? prev : prev.concat(current), [], source); | ||
} | ||
@@ -2160,2 +2163,2 @@ | ||
export { F, T, add, adjust, all, allPass, always, and, any, anyPass, append, applySpec, assoc, assocPath, both, chain, clamp, clone, complement, compose, concat, cond, converge, curry, curryN, dec, defaultTo, difference, dissoc, divide, drop, dropLast, dropLastWhile, dropRepeats, dropRepeatsWith, dropWhile, either, endsWith, eqProps, equals, evolve, evolveArray, evolveObject, filter, filterArray, filterObject, find, findIndex, findLast, findLastIndex, flatten, flip, forEach, fromPairs, groupBy, groupWith, has, hasPath, head, identical, identity, ifElse, inc, includes, indexBy, indexOf, init, intersection, intersperse, is, isEmpty, isNil, join, keys, last, lastIndexOf, length, lens, lensIndex, lensPath, lensProp, map, mapArray, mapObject, match, mathMod, max, maxBy, maxByFn, mean, median, merge, mergeAll, mergeDeepRight, mergeLeft, min, minBy, minByFn, modulo, move, multiply, negate, none, not, nth, of, omit, once, or, over, partial, partition, partitionArray, partitionObject, path, pathEq, pathOr, paths, pick, pickAll, pipe, pluck, prepend, product, prop, propEq, propIs, propOr, props, range, reduce, reject, repeat, replace, reverse, set, slice, sort, sortBy, split, splitAt, splitEvery, splitWhen, startsWith, subtract, sum, symmetricDifference, tail, take, takeLast, takeLastWhile, takeWhile, tap, test, times, toLower, toPairs, toString, toUpper, transpose, trim, tryCatch, type, union, uniq, uniqWith, unless, update, values, view, when, where, whereEq, without, xor, zip, zipObj, zipWith }; | ||
export { F, T, add, adjust, all, allPass, always, and, any, anyPass, append, applySpec, assoc, assocPath, both, chain, clamp, clone, complement, compose, concat, cond, converge, curry, curryN, dec, defaultTo, difference, dissoc, divide, drop, dropLast, dropLastWhile, dropRepeats, dropRepeatsWith, dropWhile, either, endsWith, eqProps, equals, evolve, evolveArray, evolveObject, filter, filterArray, filterObject, find, findIndex, findLast, findLastIndex, flatten, flip, forEach, fromPairs, groupBy, groupWith, has, hasPath, head, identical, identity, ifElse, inc, includes, includesArray, indexBy, indexOf, init, intersection, intersperse, is, isEmpty, isNil, join, keys, last, lastIndexOf, length, lens, lensIndex, lensPath, lensProp, map, mapArray, mapObject, match, mathMod, max, maxBy, maxByFn, mean, median, merge, mergeAll, mergeDeepRight, mergeLeft, min, minBy, minByFn, modulo, move, multiply, negate, none, not, nth, of, omit, once, or, over, partial, partition, partitionArray, partitionObject, path, pathEq, pathOr, paths, pick, pickAll, pipe, pluck, prepend, product, prop, propEq, propIs, propOr, props, range, reduce, reject, repeat, replace, reverse, set, slice, sort, sortBy, split, splitAt, splitEvery, splitWhen, startsWith, subtract, sum, symmetricDifference, tail, take, takeLast, takeLastWhile, takeWhile, tap, test, times, toLower, toPairs, toString, toUpper, transpose, trim, tryCatch, type, union, uniq, uniqWith, unless, update, values, view, when, where, whereEq, without, xor, zip, zipObj, zipWith }; |
@@ -619,2 +619,13 @@ 'use strict'; | ||
function includesArray(valueToFind, input) { | ||
let index = -1; | ||
while (++index < input.length) { | ||
if (equals(input[index], valueToFind)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
function includes(valueToFind, input) { | ||
@@ -632,11 +643,3 @@ if (arguments.length === 1) return _input => includes(valueToFind, _input); | ||
if (!_isArray(input)) return false; | ||
let index = -1; | ||
while (++index < input.length) { | ||
if (equals(input[index], valueToFind)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
return includesArray(valueToFind, input); | ||
} | ||
@@ -2129,3 +2132,3 @@ | ||
return reduce((prev, current) => includes(current, matchAgainst) ? prev : prev.concat(current), [], source); | ||
return reduce((prev, current) => includesArray(current, matchAgainst) ? prev : prev.concat(current), [], source); | ||
} | ||
@@ -2228,2 +2231,3 @@ | ||
exports.includes = includes; | ||
exports.includesArray = includesArray; | ||
exports.indexBy = indexBy; | ||
@@ -2230,0 +2234,0 @@ exports.indexOf = indexOf; |
@@ -621,2 +621,13 @@ (function (global, factory) { | ||
function includesArray(valueToFind, input) { | ||
let index = -1; | ||
while (++index < input.length) { | ||
if (equals(input[index], valueToFind)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
function includes(valueToFind, input) { | ||
@@ -634,11 +645,3 @@ if (arguments.length === 1) return _input => includes(valueToFind, _input); | ||
if (!_isArray(input)) return false; | ||
let index = -1; | ||
while (++index < input.length) { | ||
if (equals(input[index], valueToFind)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
return includesArray(valueToFind, input); | ||
} | ||
@@ -2131,3 +2134,3 @@ | ||
return reduce((prev, current) => includes(current, matchAgainst) ? prev : prev.concat(current), [], source); | ||
return reduce((prev, current) => includesArray(current, matchAgainst) ? prev : prev.concat(current), [], source); | ||
} | ||
@@ -2230,2 +2233,3 @@ | ||
exports.includes = includes; | ||
exports.includesArray = includesArray; | ||
exports.indexBy = indexBy; | ||
@@ -2232,0 +2236,0 @@ exports.indexOf = indexOf; |
188
package.json
{ | ||
"name": "rambda", | ||
"version": "6.5.2", | ||
"scripts": { | ||
"out": "cd ../rambda-scripts&&yarn populate:docs&&cd ../rambda-scripts&&yarn populate:readme", | ||
"x": "cd ../rambda-scripts&&yarn populate:docs:rambdax&&cd ../rambda-scripts&&yarn populate:readme:rambdax", | ||
"github": "cd ../rambda-scripts&&yarn github", | ||
"docs": "cd ../rambda-scripts&&yarn highlighter", | ||
"toolbelt": "cd ../rambda-scripts&&yarn toolbelt", | ||
"immutable": "cd ../rambda-scripts&&yarn immutable", | ||
"usedby": "cd ../rambda-scripts&&yarn usedby", | ||
"lint": "cd ../rambda-scripts&&yarn lint", | ||
"build": "yarn build:main&&yarn build:web&&yarn deps", | ||
"build:web": "cross-env NODE_ENV=build rollup -c files/rollup.web.config.js", | ||
"build:main": "cross-env NODE_ENV=build rollup -c files/rollup.config.js", | ||
"parse": "cd ../rambda-scripts&&yarn hjson:parse", | ||
"deps": "cd ../rambda-scripts&&yarn hjson:fix", | ||
"docsify": "docsi init ./docs", | ||
"new": "cd ../rambda-scripts&&yarn new", | ||
"test": "jest source -u --bail=false", | ||
"cover:spec": "jest source --coverage --no-cache -w 1", | ||
"cover": "yarn typings&&yarn cover:spec", | ||
"benchmark": "cd ../rambda-scripts&&yarn benchmarks", | ||
"benchmarkx": "cd ../rambda-scripts&&yarn benchmarksx", | ||
"typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source", | ||
"fix": "mkdir $HOME/.dts/perf -p" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@babel/core": "7.12.10", | ||
"@babel/plugin-proposal-object-rest-spread": "7.12.1", | ||
"@babel/preset-env": "7.12.11", | ||
"@rollup/plugin-babel": "5.2.2", | ||
"@rollup/plugin-commonjs": "17.0.0", | ||
"@rollup/plugin-json": "4.1.0", | ||
"@rollup/plugin-node-resolve": "11.1.0", | ||
"@rollup/plugin-replace": "2.3.4", | ||
"@types/jest": "26.0.20", | ||
"@types/ramda": "0.27.34", | ||
"combinate": "1.1.2", | ||
"cross-env": "7.0.3", | ||
"dtslint": "4.0.6", | ||
"helpers-fn": "1.3.2", | ||
"is-ci": "2.0.0", | ||
"jest": "26.6.3", | ||
"jest-extended": "0.11.5", | ||
"lodash": "4.17.20", | ||
"rambdax": "7.1.0", | ||
"ramda": "0.27.1", | ||
"rollup": "2.36.2", | ||
"rollup-plugin-cleanup": "3.2.1", | ||
"rollup-plugin-sourcemaps": "0.6.3", | ||
"typescript": "4.1.3" | ||
}, | ||
"jest": { | ||
"testEnvironment": "node", | ||
"testRegex": ".*\\.spec\\.js$", | ||
"setupFilesAfterEnv": [ | ||
"jest-extended" | ||
], | ||
"collectCoverageFrom": [ | ||
"source/*.js", | ||
"!_internals", | ||
"!benchmarks" | ||
] | ||
}, | ||
"files": [ | ||
"dist", | ||
"src", | ||
"_ts-toolbelt", | ||
"CHANGELOG.md", | ||
"index.d.ts" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/selfrefactor/rambda.git" | ||
}, | ||
"license": "MIT", | ||
"author": "self_refactor", | ||
"description": "Lightweight and faster alternative to Ramda", | ||
"module": "./dist/rambda.esm.js", | ||
"main": "./dist/rambda", | ||
"umd": "./dist/rambda.umd.js", | ||
"sideEffects": false, | ||
"keywords": [ | ||
"ramda", | ||
"fp", | ||
"functional", | ||
"utility", | ||
"lodash" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/selfrefactor/rambda/issues" | ||
}, | ||
"homepage": "https://github.com/selfrefactor/rambda#readme" | ||
"name": "rambda", | ||
"version": "6.5.3", | ||
"scripts": { | ||
"out": "cd ../rambda-scripts&&yarn populate:docs&&cd ../rambda-scripts&&yarn populate:readme", | ||
"x": "cd ../rambda-scripts&&yarn populate:docs:rambdax&&cd ../rambda-scripts&&yarn populate:readme:rambdax", | ||
"github": "cd ../rambda-scripts&&yarn github", | ||
"docs": "cd ../rambda-scripts&&yarn highlighter", | ||
"toolbelt": "cd ../rambda-scripts&&yarn toolbelt", | ||
"immutable": "cd ../rambda-scripts&&yarn immutable", | ||
"usedby": "cd ../rambda-scripts&&yarn usedby", | ||
"lint": "cd ../rambda-scripts&&yarn lint", | ||
"build": "yarn build:main&&yarn build:web&&yarn deps", | ||
"build:web": "cross-env NODE_ENV=build rollup -c files/rollup.web.config.js", | ||
"build:main": "cross-env NODE_ENV=build rollup -c files/rollup.config.js", | ||
"parse": "cd ../rambda-scripts&&yarn hjson:parse", | ||
"deps": "cd ../rambda-scripts&&yarn hjson:fix", | ||
"docsify": "docsify init ./docs", | ||
"new": "cd ../rambda-scripts&&yarn new", | ||
"test": "jest source -u --bail=false", | ||
"cover:spec": "jest source --coverage --no-cache -w 1", | ||
"cover": "yarn typings&&yarn cover:spec", | ||
"benchmark": "cd ../rambda-scripts&&yarn benchmarks", | ||
"benchmarkx": "cd ../rambda-scripts&&yarn benchmarksx", | ||
"typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source", | ||
"fix": "mkdir $HOME/.dts/perf -p" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@babel/core": "7.12.10", | ||
"@babel/plugin-proposal-object-rest-spread": "7.12.1", | ||
"@babel/preset-env": "7.12.11", | ||
"@rollup/plugin-babel": "5.2.2", | ||
"@rollup/plugin-commonjs": "17.0.0", | ||
"@rollup/plugin-json": "4.1.0", | ||
"@rollup/plugin-node-resolve": "11.1.0", | ||
"@rollup/plugin-replace": "2.3.4", | ||
"@types/jest": "26.0.20", | ||
"@types/ramda": "0.27.34", | ||
"combinate": "1.1.2", | ||
"cross-env": "7.0.3", | ||
"dtslint": "4.0.6", | ||
"helpers-fn": "1.3.2", | ||
"is-ci": "2.0.0", | ||
"jest": "26.6.3", | ||
"jest-extended": "0.11.5", | ||
"lodash": "4.17.20", | ||
"rambdax": "7.1.0", | ||
"ramda": "0.27.1", | ||
"rollup": "2.36.2", | ||
"rollup-plugin-cleanup": "3.2.1", | ||
"rollup-plugin-sourcemaps": "0.6.3", | ||
"typescript": "4.1.3" | ||
}, | ||
"jest": { | ||
"testEnvironment": "node", | ||
"testRegex": ".*\\.spec\\.js$", | ||
"setupFilesAfterEnv": [ | ||
"jest-extended" | ||
], | ||
"collectCoverageFrom": [ | ||
"source/*.js", | ||
"!_internals", | ||
"!benchmarks" | ||
] | ||
}, | ||
"files": [ | ||
"dist", | ||
"src", | ||
"_ts-toolbelt", | ||
"CHANGELOG.md", | ||
"index.d.ts" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/selfrefactor/rambda.git" | ||
}, | ||
"license": "MIT", | ||
"author": "self_refactor", | ||
"description": "Lightweight and faster alternative to Ramda", | ||
"module": "./dist/rambda.esm.js", | ||
"main": "./dist/rambda", | ||
"umd": "./dist/rambda.umd.js", | ||
"sideEffects": false, | ||
"keywords": [ | ||
"ramda", | ||
"fp", | ||
"functional", | ||
"utility", | ||
"lodash" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/selfrefactor/rambda/issues" | ||
}, | ||
"homepage": "https://github.com/selfrefactor/rambda#readme" | ||
} |
import { _isArray } from './_internals/_isArray' | ||
import { equals } from './equals' | ||
export function includesArray(valueToFind, input){ | ||
let index = -1 | ||
while (++index < input.length){ | ||
if (equals(input[ index ], valueToFind)){ | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
export function includes(valueToFind, input){ | ||
@@ -14,11 +26,3 @@ if (arguments.length === 1) return _input => includes(valueToFind, _input) | ||
let index = -1 | ||
while (++index < input.length){ | ||
if (equals(input[ index ], valueToFind)){ | ||
return true | ||
} | ||
} | ||
return false | ||
return includesArray(valueToFind, input) | ||
} |
@@ -1,2 +0,2 @@ | ||
import { includes } from './includes' | ||
import { includesArray } from './includes' | ||
import { reduce } from './reduce' | ||
@@ -11,3 +11,3 @@ | ||
(prev, current) => | ||
includes(current, matchAgainst) ? prev : prev.concat(current), | ||
includesArray(current, matchAgainst) ? prev : prev.concat(current), | ||
[], | ||
@@ -14,0 +14,0 @@ source |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18773
21264
1096352