isRegExp source npm

_.isRegExp(value)

Checks if value is classified as a RegExp object.

Arguments

  1. value (*)

    The value to check.

Returns (boolean)

Returns true if value is correctly classified, else false.

Example

_.isRegExp(/abc/);
// => true

_.isRegExp('/abc/');
// => false