Of course it can be much shorter than 20 lines ;) : http://jsfiddle.net/BDEWf/6/

On Jun 5, 10:55 pm, jiggliemon <[email protected]> wrote:
> Oskar pointed out that "is" is a reserved word in Javascript so it
> could cause problems in IE1+
> Not to mention the Taboo of extending Object.
>
> It just seems a little cumbersome having to write 20-lines and extend
> all the Native objects to essentially get the same functionality as
> the 3-liner object extender.
>
> http://jsfiddle.net/jiggliemon/24TXR/
>
> On Jun 5, 7:24 am, Ryan Florence <[email protected]> wrote:
>
>
>
> > I've done this a few times, I certain like looking at:
>
> > if (arg.isNumber())
>
> > than looking at
>
> > if ($type(arg) == 'number')
>
> > Yours is pretty creative.
>
> > On Jun 4, 2010, at 11:29 PM, jiggliemon wrote:
>
> > > What about having a simple "is" method on all the main types?
> > >http://jsfiddle.net/jiggliemon/BDEWf/2/
>
> > > -Chase

Reply via email to