Is String buffer - Node.js String

Node.js examples for String:String Value

Description

Is String buffer

Demo Code


exports.isBuffer = function (obj) {

    if (obj === null ||
        typeof obj === 'undefined') {

        return false;
    }//from  w  w  w .j a v  a 2 s  . c o  m

    return !!(obj.constructor &&
        obj.constructor.isBuffer &&
        obj.constructor.isBuffer(obj));
};

Related Tutorials