In some old versions of V8, regular expressions objects had a type of "function"
(initially, regular expressions objects were callable as functions, even if nobody used that feature).
That's why it wasn't possible to use typeof param === 'function'
to check if a value is a function.
This isn't the case now. Use typeof
, not _.isFunction
, this code is obsolete.