alert( Object.isString( "foo" ));
// alerts "string"
alert( Object.isString( new String( "foo" ) ));
// alerts "object"

I know why this happens - because Prototype uses the underlying typeof's 
understanding of type.

Personally I think this is a bug though - Javascript is just being difficult 
here and Prototype should make stuff like this easier. It should 
return "string" regardless of how the string was created.

Anyone agree I should file this as a bug, or is there a good reason the 
current behaviour is desirable?


Jim Higson
my blog:

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to