UNPKG

@webqit/util

Version:

Utility functions used accross multiple JS libraries.

18 lines (15 loc) 364 B
/** * @imports */ import _isArray from './isArray.js'; /** * Tells if an object is direct instance of Array.prototype. * Quite useful in differentiating array-extension instances from plain arrays ([]). * * @param object obj * * @return bool */ export default function(obj) { return _isArray(obj) && Object.getPrototypeOf(obj) === Array.prototype; };