Constructor
new DataObject(key, data)
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
key |
string | object index key (e.g., 1018sub3) |
|||||||||||||||||||||||||||||||||
data |
object | creation parameters. Properties
|
Fires:
Members
dataTypeString :string
The data type as a string.
Type:
- string
index :number
The Eds index.
Type:
- number
objectTypeString :string
The object type as a string.
Type:
- string
raw :Buffer
The raw data Buffer.
Type:
- Buffer
size :number
Size of the raw data in bytes including sub-entries.
Type:
- number
subIndex :number|null
The Eds subIndex.
Type:
- number | null
value :number|bigint|string|Date
The cooked value.
Type:
- number | bigint | string | Date
Methods
(static) isDataObject(obj) → {boolean}
- Description:
Returns true if the object is an instance of DataObject;
- Source:
- Since:
- 6.0.0
Parameters:
Name | Type | Description |
---|---|---|
obj |
* | object to test. |
Returns:
true if obj is DataObject.
- Type
- boolean
at(index) → {DataObject}
Parameters:
Name | Type | Description |
---|---|---|
index |
number | sub-entry index to get. |
Returns:
new DataObject.
- Type
- DataObject
toString() → {string}
Returns:
DataObject string representation.
- Type
- string
valueOf() → {number|bigint|string|Date}
Returns:
DataObject value.
- Type
- number | bigint | string | Date