NAME

readonly - returns whether a value is read-only

SYNOPSIS

oadl::readonly(val)
oadl::readonly(val, pub)
val.readonly()
val.readonly(pub)

DESCRIPTION

The single-argument form returns whether the given object or array value val is read-only. The two-argument form returns whether the public property pub of Object obj is read-only.

RETURN VALUE

true if the object or property is read-only, false otherwise.

ERRORS

TypeCheck if val, obj, or pub is not of an appropriate type.

EXAMPLE

    const a = "12345"
    a.readonly()
true
    class foo { protected var x; public var y; }
    foo bar()
    bar.readonly(public::x)
true
    bar.readonly(public::y)
false

SEE ALSO

protect