If this dict is for a def then return its name otherwise return an empty string.
The def name or an empty string.
for (let key of dict.keys) {
console.log(key)
}
All keys used in the dict.
console.log('Size: ' + dict.length)
The number of entries in the dict.
for (let value of dict.values) {
console.log(value.getKind())
}
All values for the dict.
Iterate over a dict.
This enables a 'for ... of' loop to be used directly on an iterator.
A new iterator for a dict.
// Iterate a dict
for (let row of dict) {
console.log(row.name)
console.log(row.value)
}
Return true if the dict matches the specified filter or if the value exists in the dict at least once.
if (dict.any('site and geoCity == "London"')) {
...
}
The haystack value, haystack filter or AST node.
Optional haystack filter evaluation context.
True if the property value exists in the dict.
The dict as an array like object.
Clear all entries from the dict.
// Clear all the entries from the dict.
dict.clear()
Compares two values.
The value to compare against.
The sort order as negative, 0, or positive.
Value equality check.
The value to test.
True if the value is the same.
Returns a haystack value from the dict or undefined if it can't be found.
// Gets the value as an HVal so cast to an HStr.
const str = dict.get('foo') as HStr
if (str) {
// Do something.
}
// Method is generic to make it easier on the eye for casting.
const str1 = dict.get<HStr>('foo')
The name of the value to find.
The value or undefined if it can't be found.
The value's kind.
Returns true if the dict has the specified key.
if (dict.has('foo')) {
// Do something
}
The name of the key.
True if the value exists in the dict.
Dump the value to the local console output.
An optional message to display before the value.
The value instance.
if (dict.isEmpty()) {
// There are no entries in the dict.
}
True when there are no entries in the dict.
Compares the value's kind.
The kind to compare against.
True if the kind matches.
Returns true if the haystack filter matches the value.
This method is the same as any
.
if (dict.matches('site and geoCity == "London"')) {
// Do something
}
The filter to test.
Optional haystack filter evaluation context.
True if the filter matches ok.
Returns a copy of the dict.
Return a reflected array of children prototypes.
If a namespace isn't specified then the default environment namespace will be used.
An optional namespace to perform the protos call from.
An array of dicts.
Analyze this dict and return its implemented defs.
If a namespace isn't specified then the default environment namespace will be used.
An optional namespace to perform the reflect from.
An array of dicts.
Removes a property from the dict.
// Removes the tag named foo.
dict.remove('foo')
The property name.
Set a haystack value.
dict.set('foo', HStr.make('New value'))
// Set the value using Hayson
dict.set('foo', 'New value')
The name to set.
The haystack value to set.
The dict instance.
An Axon encoded string.
The value as a dict.
Encodes to an encoded zinc value that can be used in a haystack filter string.
A dict isn't supported in filter so throw an error.
The encoded value that can be used in a haystack filter.
// Convert the dict to an HGrid with one row.
const hgrid = dict.toGrid()
The dict as a grid.
A JSON reprentation of the object.
// Convert the dict to an HList of haystack strings.
const hlist = dict.toList<HStr>()
All the dict's values as a haystack list
Returns the underlying object being managed by the store.
// Gets a JS Object with the keys as strings and the values as HVals.
const obj = dict.toObj()
A the underlying object.
A string representation of the value.
Encodes to an encoding zinc value.
The encoded zinc string.
Update a dict from another dict(s) or Hayson dict(s).
dict.update(otherDict, anotherDict)
// Update using a Hayson object
dict.update({ dis: 'A new display string', curVal: 20 })
The dicts to update from.
The dict instance.
Iterates through the dict to ensure we have a valid set of haystack values.
As the dict's internals are directly exposed calling this method will ensure all the values held in the dict are valid haystack values.
Generated using TypeDoc
isolation
Actuator used to isolate an equipment from a pipe or ductwork system