Constructs a new namespace.
An object containing names to subtypes for all defs that are choices.
The name of the available features.
The defs for all of the core haystack value types.
A object that maps def names to their respective tagOn defs.
A list of all the tagOn names.
Static
defaultThe default namespace for the environment.
Set the default namespace for the environment.
The new default namespace.
Decomposes a conjunct into its respective defs and returns them.
If the def is not a conjunct then it will just return itself.
The conjunct def to breakdown.
The defs the conjunct references.
An error if any of the defs are invalid.
Return the Haystack kind value from the def. If the def is invalid or a kind cannot be ascertained then return undefined.
Please note, curVal
and writeVal
are scalars but don't extend
a def that could relate to a concrete type (i.e. number or bool). This implies
these values can be any scalar and hence match multiple kinds. In this case undefined
will be returned for the kind.
The name of the def to get the kind for.
The kind or undefined it one cannot be found.
Return true if the specified def is a choice.
The def name.
True if the def is a choice.
Return true if the specified def is a entity.
The def name.
True if the def is a entity.
Return true if the specified def is a marker.
The def name.
True if the def is a marker.
Return true if the specified def is a val.
The def name.
True if the def is a val.
Return true if the def exists in the namespace.
This method is a duplicate of hasName
.
The name of the def to look up.
True if the def exists.
Return true if the def exists in the namespace.
The name of the def to look up.
True if the def exists.
Query a subject's relationship.
Relationships model how entities are related to one another via instance to instance relationships versus def to def associations.
https://project-haystack.dev/doc/docHaystack/Relationships#querying
True if a match is made.
Returns true if the def has subtypes.
The def name.
True if the def has subtypes.
Return true if the dict is valid for the specified tag.
The tag name.
The dict to validate against.
true if the dict is valid.
Analyze the subject dict and return its implemented defs.
The subject dict.
The reflected defs.
Validates a dict for a tag.
try {
namespace.validate('site', new HDict({ site: HMarker.make() }))
}
catch(err) {
console.error(err)
}
The name of the tag to validate.
The dict to validate against.
An error if the tags on the dict are not valid.
Validates all of the tags on the dict. Any tags that don't exist in the namespcae will be skipped.
try {
namespace.validateAll(new HDict({ site: HMarker.make() }))
}
catch(err) {
console.error(err)
}
The dict to validate.
An error if the tags on the dict are not valid.
Static
getReturn the feature from the feature key. An empty string is returned if no feature can be found.
For example, lib:foo
would return lib
.
The name to parse.
The feature.
Static
getReturn the feature name from the feature key. An empty string is returned if no feature name can be found.
For example, lib:foo
would return foo
.
The name to parse.
The feature name.
Static
isReturn true if the name is for a conjunct.
The name to test.
True if the name is for a conjunct.
Static
isReturn true if the name is for a feature.
The name to test.
True if the name is for a feature.
Static
splitSplit the conjunct name into its component parts.
The name to split.
The split marker tag names for the conjunct.
Generated using TypeDoc
Haystack namespace.
A namespace holds a collection of normalized defs.