Open mathiasbynens opened 10 years ago
console.lol('oops');
?
current = Dqte.noz;
@remeh That wouldn’t work, as only misspelled property names can be detected using proxies. tpyo(global).Dqte.noz
(or tpyo(window).Dqte.noz
in browser environments) could work though, as long as you don’t misspell global
(or window
).
Here are few horrible puns I tried @mathiasbynens :
array.poop() // for pop()
array.goin() // for join()
array.shit() // for shift()
JSON.prase() // for parse()
Math.squrt() // for Math.sqrt()
Math.poo() // for Math.pow()
Object.evil // for Object.eval
String.bug // for String.big ?
Happy to send a PR, if worthy.
Math.:poop:() ? Can you make it work ?
@hemanth Nice work! Object.eval
is not a thing though, right? Anyway, that pull request would be very welcome. You could add these to the tests, and some to the README. Thanks in advance.
@gulian Sadly :poop: is not a valid unquoted property name, and even if it was, the Levenshtein distance algorithm wouldn’t be able to map it to anything you’d expect. :(
I'm so sad
console.:heart:() -> console.love() -> console.log() ...
Ok, I'm done.
(it's working ! :smile:)
@mathiasbynens Object.eval is a valid thinge, but is obsolete and String.bug
must be String.big
but there is no String.big
on node. So better I shall skip them?
Ah, you meant Object#eval
(i.e. Object.prototype.eval
) instead of Object.eval
! I had never heard about that one either, though :) Pretty cool.
Also, Node does have String#big
(although there is no such thing as String.big
in any JS environment), so feel free to include it in the tests.
@mathiasbynens Ah, that was some FF masala there with String#big
Just sent a PR :)
Do your worst. Bonus points for horrible puns.