wallet-core/node_modules/concordance/lib/hasLength.js
2017-08-14 05:02:09 +02:00

8 lines
205 B
JavaScript

'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