Abstract
Abstract
Readonly
keyAbstract
Readonly
lengthReturns the number of members contained in this Item
, if this Item
is
a [[Record]]; otherwise returns 0
if this Item
is not a Record
.
Abstract
Readonly
tagReturns the key
string of the first member of this Item
, if this Item
is a [[Record]], and its first member is an [[Attr]]; otherwise returns
undefined
if this Item
is not a Record
, or if this Item
is a
Record
whose first member is not an Attr
.
Used to concisely get the name of the discriminating attribute of a
structure. The tag
can be used to discern the nominal type of a
polymorphic structure, similar to an XML element tag.
Abstract
Readonly
targetReturns the [[Item.flattened flattened]] members of this Item
after all
attributes have been removed, if this Item
is a [[Record]]; otherwise
returns this
if this Item
is a non-Record
Value
, or returns
the value component if this Item
is a Field
.
Used to concisely get the scalar value of an attributed structure. An
attributed structure is a Record
with one or more attributes that modify
one or more other members.
Abstract
Readonly
typeReturns the heterogeneous sort order of this Item
. Used to impose a
total order on the set of all items. When comparing two items of
different types, the items order according to their typeOrder
.
Abstract
aliasAbstract
andAbstract
bitwiseAbstract
bitwiseAbstract
bitwiseAbstract
bitwiseAbstract
bodyAbstract
booleanConverts this Item
into a boolean
value, if possible; otherwise returns
undefined
if this Item
can't be converted into a boolean
value.
Converts this Item
into a boolean
value, if possible; otherwise returns
orElse
if this Item
can't be converted into a boolean
value.
Abstract
branchAbstract
cloneAbstract
commitAbstract
compareAbstract
conditionalAbstract
debugAbstract
deletedAbstract
divideAbstract
equalsAbstract
equivalentAbstract
flattenedReturns the sole member of this Item
, if this Item
is a [[Record]]
with exactly one member, and its member is a Value
; returns [[Extant]]
if this Item
is an empty Record
; returns [[Absent]] if this Item
is
a Field
; otherwise returns this
if this Item
is a Record
with more
than one member, or if this Item
is a non-Record
Value
.
Used to convert a unary Record
into its member Value
. Facilitates
writing code that treats a unary Record
equivalently to a bare Value
.
Abstract
getAbstract
getAbstract
getAbstract
getReturns the member of this Item
at the given index
, if this Item
is
a [[Record]], and the index
is greater than or equal to zero, and less
than the [[Record.length length]] of the Record
; otherwise returns
[[Absent]] if this Item
is not a Record
, or if this Item
is a
Record
, but the index
is out of bounds.
Abstract
getAbstract
hasReturns true
if this Item
is a [[Record]] that has a [[Field]] member
with a key that is equal to the given key
; otherwise returns false
if
this Item
is not a Record
, or if this Item
is a Record
, but has no
Field
member with a key equal to the given key
.
Abstract
hashAbstract
headAbstract
headerReturns the value of the first member of this Item
, if this Item
is a
[[Record]], and its first member is an [[Attr]] whose key
string is
equal to tag
; otherwise returns [[Absent]] if this Item
is not a
Record
, or if this Item
is a Record
whose first member is not an
Attr
, or if this Item
is a Record
whose first member is an Attr
whose key
does not equal the tag
.
Used to conditionally get the value of the head Attr
of a structure, if
and only if the key string of the head Attr
is equal to the tag
. Can
be used to check if a structure might conform to a nominal type named
tag
, while simultaneously getting the value of the tag
attribute.
Abstract
headersReturns the [[Item.unflattened unflattened]] [[Item.header header]] of
this Item
, if this Item
is a [[Record]], and its first member is an
[[Attr]] whose key
string is equal to tag
; otherwise returns
undefined
.
The headers
of the tag
attribute of a structure are like the
attributes of an XML element tag; through unlike an XML element, tag
attribute headers are not limited to string keys and values.
Abstract
inverseAbstract
isAbstract
isAbstract
isAbstract
isAbstract
isAbstract
isAbstract
keyAbstract
lambdaOptional
likeAbstract
minusAbstract
moduloAbstract
negativeAbstract
notAbstract
numberConverts this Item
into a number
value, if possible; otherwise returns
undefined
if this Item
can't be converted into a number
value.
Converts this Item
into a number
value, if possible; otherwise returns
orElse
if this Item
can't be converted into a number
value.
Abstract
orAbstract
plusAbstract
positiveAbstract
stringConverts this Item
into a string
value, if possible; otherwise returns
undefined
if this Item
can't be converted into a string
value.
Converts this Item
into a string
value, if possible; otherwise returns
orElse
if this Item
can't be converted into a string
value.
Abstract
tailAbstract
timesAbstract
toAbstract
toAbstract
unflattenedReturns this
if this Item
is a [[Record]]; returns a Record
containing just this Item
, if this Item
is [[Item.isDistinct
distinct]]; otherwise returns an empty Record
if this Item
is
[[Extant]] or [[Absent]]. Facilitates writing code that treats a bare
Value
equivalently to a unary Record
.
Static
absentStatic
emptyStatic
extantStatic
fromStatic
globalGenerated using TypeDoc
Returns the key component of this
Item
, if thisItem
is a [[Field]]; otherwise returns [[Absent]] if thisItem
is aValue
.