3 var isFunction = require('../function/is-function')
4 , isObject = require('./is-object');
6 module.exports = function (x) {
7 return ((x != null) && (typeof x.length === 'number') &&
9 // Just checking ((typeof x === 'object') && (typeof x !== 'function'))
10 // won't work right for some cases, e.g.:
11 // type of instance of NodeList in Safari is a 'function'
13 ((isObject(x) && !isFunction(x)) || (typeof x === "string"))) || false;