Dm1tr1y147 2dfe7858a2 Govno
2019-09-18 14:44:37 +03:00

12 lines
301 B
JavaScript

/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
module.exports = function isBuffer (obj) {
return obj != null && obj.constructor != null &&
typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
}