Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x | const isObject = value => value && typeof value === 'object' && value.constructor === Object; const isArray = value => value && typeof value === 'object' && value.constructor === Array; const isString = value => typeof value === 'string' || value instanceof String; const isNumber = value => typeof value === 'number' && isFinite(value); const isFunction = value => typeof value === 'function'; const isBool = value => typeof value === 'boolean'; const isNull = value => value === null; const isUndefined = value => typeof value === 'undefined'; const isRegExp = value => value && typeof value === 'object' && value.constructor === RegExp; const isError = value => value instanceof Error && typeof value.message !== 'undefined'; const isDate = value => value instanceof Date; const isSymbol = value => typeof value === 'symbol'; const isLikeNull = value => isNull(value) || isUndefined(value); export { isObject, isArray, isString, isNumber, isFunction, isBool, isNull, isUndefined, isLikeNull, isRegExp, isError, isDate, isSymbol }; |