Content-Length: 410227 | pFad | https://github.com/dan-zinger-bjss/lodash/commit/16413cc32ad5d2e739cb02e5bf89872069b09830

21 Eslint cleanup (imports left), except template. · dan-zinger-bjss/lodash@16413cc · GitHub
Skip to content

Commit 16413cc

Browse files
committed
Eslint cleanup (imports left), except template.
1 parent 753e47d commit 16413cc

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

debounce.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ const nativeMin = Math.min
5959
*/
6060
function debounce(func, wait, options) {
6161
let lastArgs,
62-
lastThis,
63-
maxWait,
64-
result,
65-
timerId,
66-
lastCallTime
62+
lastThis,
63+
maxWait,
64+
result,
65+
timerId,
66+
lastCallTime
6767

6868
let lastInvokeTime = 0
6969
let leading = false

defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const hasOwnProperty = objectProto.hasOwnProperty
2929
function defaults(object, ...sources) {
3030
object = Object(object)
3131
let srcIndex = -1
32-
let srcLength = sources.length
32+
const srcLength = sources.length
3333
while (++srcIndex < srcLength) {
3434
const source = sources[srcIndex]
3535
const props = keysIn(source)

random.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ function random(lower, upper, floating) {
7373
}
7474
if (floating || lower % 1 || upper % 1) {
7575
const rand = nativeRandom()
76-
return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper)
76+
const randLength = `${ rand }`.length - 1
77+
return nativeMin(lower + (rand * (upper - lower + freeParseFloat(`1e-${ randLength }`)), upper))
7778
}
7879
return lower + nativeFloor(nativeRandom() * (upper - lower + 1))
7980
}

replace.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import toString from './toString.js'
1818
* replace('Hi Fred', 'Fred', 'Barney')
1919
* // => 'Hi Barney'
2020
*/
21-
function replace() {
22-
const args = arguments
21+
function replace(...args) {
2322
const string = toString(args[0])
2423

2524
return args.length < 3 ? string : string.replace(args[1], args[2])

template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function template(string, options, guard) {
142142
// Based on John Resig's `tmpl` implementation
143143
// (http://ejohn.org/blog/javascript-micro-templating/)
144144
// and Laura Doktorova's doT.js (https://github.com/olado/doT).
145-
let settings = templateSettings.imports.templateSettings || templateSettings
145+
const settings = templateSettings.imports.templateSettings || templateSettings
146146

147147
if (guard && isIterateeCall(string, options, guard)) {
148148
options = undefined

toPlainObject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
function toPlainObject(value) {
2424
value = Object(value)
2525
const result = {}
26-
for (let key in value) {
26+
for (const key in value) {
2727
result[key] = value[value]
2828
}
2929
return result

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/dan-zinger-bjss/lodash/commit/16413cc32ad5d2e739cb02e5bf89872069b09830

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy