eslint-plugin-you-dont-need-lodash-underscore
Advanced tools
Comparing version 6.10.0 to 6.11.0
@@ -62,3 +62,2 @@ { | ||
}, | ||
"each": { | ||
@@ -146,3 +145,2 @@ "compatible": false, | ||
}, | ||
"bind": { | ||
@@ -184,3 +182,2 @@ "ruleName": "bind", | ||
}, | ||
"keys": { | ||
@@ -220,2 +217,7 @@ "compatible": true, | ||
}, | ||
"get": { | ||
"compatible": false, | ||
"alternative": "optional chaining to get nested values and nullish coalescing operator for fallback values", | ||
"ES11": true | ||
}, | ||
"split": { | ||
@@ -277,4 +279,4 @@ "compatible": true, | ||
"flatten": { | ||
"compatible": true, | ||
"alternative": "Array.prototype.reduce((a,b) => a.concat(b), [])" | ||
"compatible": true, | ||
"alternative": "Array.prototype.reduce((a,b) => a.concat(b), [])" | ||
}, | ||
@@ -284,3 +286,15 @@ "throttle": { | ||
"alternative": "Example of native implementation: https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_throttle" | ||
}, | ||
"isString": { | ||
"compatible": true, | ||
"alternative": "str && typeof str.valueOf() === \"string\"" | ||
}, | ||
"castArray": { | ||
"compatible": true, | ||
"alternative": "Array.isArray(arr) ? arr : [arr]" | ||
}, | ||
"isFunction": { | ||
"compatible": true, | ||
"alternative": "typeof func === \"function\"" | ||
} | ||
} |
{ | ||
"name": "eslint-plugin-you-dont-need-lodash-underscore", | ||
"version": "6.10.0", | ||
"version": "6.11.0", | ||
"description": "Check methods you can use natively without lodash/underscore", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -593,3 +593,3 @@ 'use strict'; | ||
it('clamp(10, -5, 5) returns upper bound if number is greater than it', () => { | ||
assert.deepStrictEqual(clamp(10, -5, 5), 10); | ||
assert.deepStrictEqual(clamp(10, -5, 5), 5); | ||
}); | ||
@@ -831,2 +831,29 @@ it('clamp(10, -5) treats second parameter as upper bound', () => { | ||
}) | ||
describe('isFunction', () => { | ||
function isFunction(func) { | ||
if (func && typeof func === "function") { | ||
return true | ||
} | ||
return false | ||
} | ||
it('_.isFunction(setTimeout)', () => { | ||
assert.deepEqual(_.isFunction(setTimeout), | ||
isFunction(setTimeout)) | ||
}); | ||
it('_.isFunction(1)', () => { | ||
assert.deepEqual(_.isFunction(1), | ||
isFunction(1)) | ||
}); | ||
it('_.isFunction(abc)', () => { | ||
assert.deepEqual(_.isFunction("abc"), | ||
isFunction("abc")) | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
195032
16
1397
3122