new Cursor(object)
Represents a cursor over an underlying object.
Parameters:
Name | Type | Description |
---|---|---|
object |
Object | The underlying object. |
Members
-
changed
-
Whether or not there are un-flushed changes to this cursor.
-
object
-
The underlying object of this cursor
Methods
-
<static> build(objects) → {Cursor}
-
Create a Cursor instance, converting the given object to an immutable one.
Parameters:
Name Type Argument Description objects
* <repeatable>
One or more objects to create the Cursor from. Returns:
- Type
- Cursor
-
equals(other) → {Boolean}
-
Compares this cursor to another and returns whether the two are equal.
Parameters:
Name Type Description other
Cursor The other cursor. Returns:
- Type
- Boolean
-
flush()
-
If this cursor has changed, then emit the 'change' event and set the changed flag back to false.
-
refine(path)
-
Return a refinement of this cursor for the given path.
Parameters:
Name Type Argument Description path
String | Number <repeatable>
The path to refine.