manan-data 0.0.0

inventyv tikv datalayer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict'

const isLength = require('lodash/isLength')

const hop = Object.prototype.hasOwnProperty

function hasLength (obj) {
  return (
    Array.isArray(obj) ||
    (hop.call(obj, 'length') &&
      isLength(obj.length) &&
      (obj.length === 0 || '0' in obj))
  )
}
module.exports = hasLength