eslint-plugin-you-dont-need-lodash-underscore
Advanced tools
Comparing version 6.11.0 to 6.12.0
{ | ||
"name": "eslint-plugin-you-dont-need-lodash-underscore", | ||
"version": "6.11.0", | ||
"version": "6.12.0", | ||
"description": "Check methods you can use natively without lodash/underscore", | ||
@@ -22,3 +22,3 @@ "repository": { | ||
], | ||
"main": "lib/index.js", | ||
"main": "index.js", | ||
"scripts": { | ||
@@ -25,0 +25,0 @@ "coveralls": "cat ./coverage/lcov.info | coveralls", |
@@ -11,3 +11,3 @@ 'use strict'; | ||
// Only a couple of smoke tests because otherwise it would get very reduntant | ||
// Only a couple of smoke tests because otherwise it would get very redundant | ||
@@ -14,0 +14,0 @@ ruleTester.run('_.concat', rules.concat, { |
@@ -18,4 +18,4 @@ 'use strict'; | ||
const nativehArray = [1] | ||
const nativeResult = nativehArray.concat(2, [3], [[4]]) | ||
const nativeArray = [1] | ||
const nativeResult = nativeArray.concat(2, [3], [[4]]) | ||
@@ -259,3 +259,3 @@ assert.deepEqual(lodashResult, nativeResult) | ||
it ("should handle falsey values", () => { | ||
it ("should handle falsy values", () => { | ||
var val = _.get(obj, 'aa[0].b.c', 1) | ||
@@ -359,3 +359,3 @@ assert.strictEqual(val, get(obj, 'aa[0].b.c', 1)) | ||
} | ||
it('_.inRange(3, 2, 4)', () => { | ||
@@ -367,3 +367,3 @@ assert.equal( | ||
}); | ||
it('_.inRange(4, 8)', () => { | ||
@@ -375,3 +375,3 @@ assert.equal( | ||
}); | ||
it('_.inRange(4, 2)', () => { | ||
@@ -383,3 +383,3 @@ assert.equal( | ||
}); | ||
it('_.inRange(2, 2)', () => { | ||
@@ -391,3 +391,3 @@ assert.equal( | ||
}); | ||
it('_.inRange(1.2, 2)', () => { | ||
@@ -399,3 +399,3 @@ assert.equal( | ||
}); | ||
it('_.inRange(5.2, 4)', () => { | ||
@@ -407,3 +407,3 @@ assert.equal( | ||
}); | ||
it('_.inRange(-3, -2, -6)', () => { | ||
@@ -586,7 +586,7 @@ assert.equal( | ||
}); | ||
describe('clamp', () => { | ||
const clamp = (number, boundOne, boundTwo) => { | ||
if (!boundTwo) { | ||
return Math.max(number, boundOne) === boundOne ? number : boundOne; | ||
return Math.max(number, boundOne) === boundOne ? number : boundOne; | ||
} else if (Math.min(number, boundOne) === number) { | ||
@@ -696,3 +696,3 @@ return boundOne; | ||
let undefinedVariable; //undefined variable (will return true) | ||
it('_.isUndefined(definedVariable)', () => { | ||
@@ -739,3 +739,3 @@ assert.equal(_.isUndefined(definedVariable), | ||
const testArray = [1,2,3,4]; | ||
let lodashOutput = [] | ||
@@ -843,9 +843,5 @@ let nativeOutput = [] | ||
describe('isFunction', () => { | ||
function isFunction(func) { | ||
if (func && typeof func === "function") { | ||
return true | ||
} | ||
return false | ||
return (func && typeof func === "function") | ||
} | ||
@@ -868,4 +864,3 @@ | ||
}); | ||
}); |
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
3146
137010
15
1394