Skip to content

Commit

Permalink
Eslint cleanup (imports left), except template.
Browse files Browse the repository at this point in the history
  • Loading branch information
falsyvalues committed Feb 17, 2017
1 parent 753e47d commit 16413cc
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions debounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ const nativeMin = Math.min
*/
function debounce(func, wait, options) {
let lastArgs,
lastThis,
maxWait,
result,
timerId,
lastCallTime
lastThis,
maxWait,
result,
timerId,
lastCallTime

let lastInvokeTime = 0
let leading = false
Expand Down
2 changes: 1 addition & 1 deletion defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const hasOwnProperty = objectProto.hasOwnProperty
function defaults(object, ...sources) {
object = Object(object)
let srcIndex = -1
let srcLength = sources.length
const srcLength = sources.length
while (++srcIndex < srcLength) {
const source = sources[srcIndex]
const props = keysIn(source)
Expand Down
3 changes: 2 additions & 1 deletion random.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function random(lower, upper, floating) {
}
if (floating || lower % 1 || upper % 1) {
const rand = nativeRandom()
return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper)
const randLength = `${ rand }`.length - 1
return nativeMin(lower + (rand * (upper - lower + freeParseFloat(`1e-${ randLength }`)), upper))
}
return lower + nativeFloor(nativeRandom() * (upper - lower + 1))
}
Expand Down
3 changes: 1 addition & 2 deletions replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import toString from './toString.js'
* replace('Hi Fred', 'Fred', 'Barney')
* // => 'Hi Barney'
*/
function replace() {
const args = arguments
function replace(...args) {
const string = toString(args[0])

return args.length < 3 ? string : string.replace(args[1], args[2])
Expand Down
2 changes: 1 addition & 1 deletion template.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function template(string, options, guard) {
// Based on John Resig's `tmpl` implementation
// (http://ejohn.org/blog/javascript-micro-templating/)
// and Laura Doktorova's doT.js (https://github.com/olado/doT).
let settings = templateSettings.imports.templateSettings || templateSettings
const settings = templateSettings.imports.templateSettings || templateSettings

if (guard && isIterateeCall(string, options, guard)) {
options = undefined
Expand Down
2 changes: 1 addition & 1 deletion toPlainObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
function toPlainObject(value) {
value = Object(value)
const result = {}
for (let key in value) {
for (const key in value) {
result[key] = value[value]
}
return result
Expand Down

0 comments on commit 16413cc

Please sign in to comment.