On 10/22/07, P T Withington <[EMAIL PROTECTED]> wrote:
> IWBNI there were a single test for string-ness.  In ES3, you have to
> say:
>
>    typeof x == 'string' || (typeof x == 'object && x instanceof String)
>
> Am I right in thinking that in ES4 you will be able to say:
>
>    x is string
>
> to ask the same question?

You ask

  x is AnyString

instead.  AnyString is a predefined union type containing String and
string.  (Ditto AnyBoolean, AnyNumber.)

--lars
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to