On Sat, Aug 20, 2011 at 8:22 PM, Nick Morgan <[email protected]> wrote:
> Hi guys
>
> Thought I'd share a little toy I just made, to see what you thought:
>
...
> It gives you access to the value of private vars via a safe eval.
> Thought it might come in useful for testing occasionally. I'm not
> suggesting using it in production code, just thought it was a nice
> idea :) So, what do you think?

Personally I'd never use a construct like this. Just expose private
variables as you go. Using eval is dangerous, especially because I
don't quite see the point of the regex. I mean, what is clean() trying
to do? `alert('foo');` is going to go through...

Also, as a nit, it is "perfectly valid" (though quite silly) to use a
unicode escape in variable names ;) I suppose it doesn't really apply
to this case, but whatever.

- peter

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to