Skip to content

lint files #4416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .internal/baseOrderBy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import baseEach from './baseEach.js'
import baseSortBy from './baseSortBy.js'
import compareMultiple from './compareMultiple.js'
import isArrayLike from '../isArrayLike.js'

/**
* The base implementation of `orderBy` without param guards.
Expand Down
28 changes: 14 additions & 14 deletions .internal/createAssigner.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import isIterateeCall from './isIterateeCall.js';
import isIterateeCall from './isIterateeCall.js'

/**
* Creates a function like `assign`.
Expand All @@ -9,28 +9,28 @@ import isIterateeCall from './isIterateeCall.js';
*/
function createAssigner(assigner) {
return (object, ...sources) => {
let index = -1;
let length = sources.length;
let customizer = length > 1 ? sources[length - 1] : undefined;
const guard = length > 2 ? sources[2] : undefined;
let index = -1
let length = sources.length
let customizer = length > 1 ? sources[length - 1] : undefined
const guard = length > 2 ? sources[2] : undefined

customizer = (assigner.length > 3 && typeof customizer == 'function')
? (length--, customizer)
: undefined;
: undefined

if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
customizer = length < 3 ? undefined : customizer
length = 1
}
object = Object(object);
object = Object(object)
while (++index < length) {
const source = sources[index];
const source = sources[index]
if (source) {
assigner(object, source, index, customizer);
assigner(object, source, index, customizer)
}
}
return object;
};
return object
}
}

export default createAssigner;
export default createAssigner
2 changes: 1 addition & 1 deletion .internal/getSymbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const nativeGetSymbols = Object.getOwnPropertySymbols
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
function getSymbols (object) {
function getSymbols(object) {
if (object == null) {
return []
}
Expand Down
2 changes: 1 addition & 1 deletion .internal/getSymbolsIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import getSymbols from './getSymbols.js'
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
function getSymbolsIn (object) {
function getSymbolsIn(object) {
const result = []
while (object) {
result.push(...getSymbols(object))
Expand Down
2 changes: 1 addition & 1 deletion .internal/getTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function getTag(value) {
if (value == null) {
return value === undefined ? '[object Undefined]' : '[object Null]'
}
return toString.call(value)
return toString.call(value)
}

export default getTag
9 changes: 5 additions & 4 deletions .internal/isIterateeCall.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import isArrayLike from '../isArrayLike.js'
import isIndex from './isIndex.js'
import isObject from '../isObject.js'
import eq from '../eq.js'

/**
* Checks if the given arguments are from an iteratee call.
Expand All @@ -15,16 +16,16 @@ import isObject from '../isObject.js'

function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
return false
}
const type = typeof index;
const type = typeof index
if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)
) {
return eq(object[index], value);
return eq(object[index], value)
}
return false;
return false
}

export default isIterateeCall
1 change: 1 addition & 0 deletions .internal/root.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global globalThis, self */
import freeGlobal from './freeGlobal.js'

/** Detect free variable `globalThis` */
Expand Down
2 changes: 1 addition & 1 deletion debounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function debounce(func, wait, options) {

function startTimer(pendingFunc, wait) {
if (useRAF) {
root.cancelAnimationFrame(timerId);
root.cancelAnimationFrame(timerId)
return root.requestAnimationFrame(pendingFunc)
}
return setTimeout(pendingFunc, wait)
Expand Down
6 changes: 3 additions & 3 deletions findLast.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ import isArrayLike from './isArrayLike.js'
* findLast([1, 2, 3, 4], n => n % 2 == 1)
* // => 3
*/
function findLast (collection, predicate, fromIndex) {
function findLast(collection, predicate, fromIndex) {
let iteratee
const iterable = Object(collection)
if (!isArrayLike(collection)) {
collection = Object.keys(collection)
iteratee = predicate
predicate = key => iteratee(iterable[key], key, iterable)
predicate = (key) => iteratee(iterable[key], key, iterable)
}
const index = findLastIndex(collection, predicate, fromIndex)
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined
}

export default findLast
2 changes: 1 addition & 1 deletion throttle.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function throttle(func, wait, options) {
return debounce(func, wait, {
leading,
trailing,
'maxWait': wait,
'maxWait': wait
})
}

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy