Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

View File

@@ -1,13 +1,13 @@
import baseKeys from './.internal/baseKeys.js';
import getTag from './.internal/getTag.js';
import isArguments from './isArguments.js';
import isArrayLike from './isArrayLike.js';
import isBuffer from './isBuffer.js';
import isPrototype from './.internal/isPrototype.js';
import isTypedArray from './isTypedArray.js';
import baseKeys from './.internal/baseKeys.js'
import getTag from './.internal/getTag.js'
import isArguments from './isArguments.js'
import isArrayLike from './isArrayLike.js'
import isBuffer from './isBuffer.js'
import isPrototype from './.internal/isPrototype.js'
import isTypedArray from './isTypedArray.js'
/** Used to check objects for own properties. */
const hasOwnProperty = Object.prototype.hasOwnProperty;
const hasOwnProperty = Object.prototype.hasOwnProperty
/**
* Checks if `value` is an empty object, collection, map, or set.
@@ -25,43 +25,43 @@ const hasOwnProperty = Object.prototype.hasOwnProperty;
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
* @example
*
* isEmpty(null);
* isEmpty(null)
* // => true
*
* isEmpty(true);
* isEmpty(true)
* // => true
*
* isEmpty(1);
* isEmpty(1)
* // => true
*
* isEmpty([1, 2, 3]);
* isEmpty([1, 2, 3])
* // => false
*
* isEmpty({ 'a': 1 });
* isEmpty({ 'a': 1 })
* // => false
*/
function isEmpty(value) {
if (value == null) {
return true;
return true
}
if (isArrayLike(value) &&
(Array.isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
return !value.length;
return !value.length
}
const tag = getTag(value);
const tag = getTag(value)
if (tag == '[object Map]' || tag == '[object Set]') {
return !value.size;
return !value.size
}
if (isPrototype(value)) {
return !baseKeys(value).length;
return !baseKeys(value).length
}
for (const key in value) {
if (hasOwnProperty.call(value, key)) {
return false;
return false
}
}
return true;
return true
}
export default isEmpty;
export default isEmpty