blob: 18df0d369c73df3a91369d84f770336253dc20cd (
plain)
1
2
3
4
5
6
7
|
'use strict'
const hop = Object.prototype.hasOwnProperty
function hasLength (obj) {
return Array.isArray(obj) || (hop.call(obj, 'length') && typeof obj.length === 'number')
}
module.exports = hasLength
|