Is object an regex - Node.js Object

Node.js examples for Object:Object Type

Description

Is object an regex

Demo Code


exports.isRegExp = function (obj) {
    return Object.prototype.toString.call(obj) === '[object RegExp]';
};

Related Tutorials