changed common.typeOf to use util.isRexExp #68

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

ericchaves commented May 1, 2012

When testing an object type, to properly support sandboxed RegExp (ie defined in other node context) we should use util.isRegExp instead of instanceof which is prototype based and won't work between contexts.

Contributor

jfhbrook commented May 1, 2012

Looks good to me. I'll pull this in later today (in case anyone else wants to comment).

Contributor

gradus commented May 3, 2012

+1

full discussion of this in issue #65

Contributor

gradus commented May 3, 2012

You will have to add var util = require('util');
either at the top of common.js or in common.typeOf

Contributor

ericchaves commented May 3, 2012

Hi kris,

Util is defined at the top oferece the file.

Contributor

gradus commented May 3, 2012

Well aren't I blind as a bat. I see it now. thanks.
Nice work. I appreciate your insight in our discussion on issue #65

Contributor

jfhbrook commented May 4, 2012

Tested and merged! Thanks @ericchaves :)

@jfhbrook jfhbrook closed this May 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment