1 var isObjectLike = require('./isObjectLike');
3 var arrayBufferTag = '[object ArrayBuffer]';
5 /** Used for built-in method references. */
6 var objectProto = Object.prototype;
9 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
12 var objectToString = objectProto.toString;
15 * Checks if `value` is classified as an `ArrayBuffer` object.
21 * @param {*} value The value to check.
22 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
25 * _.isArrayBuffer(new ArrayBuffer(2));
28 * _.isArrayBuffer(new Array(2));
31 function isArrayBuffer(value) {
32 return isObjectLike(value) && objectToString.call(value) == arrayBufferTag;
35 module.exports = isArrayBuffer;