Never manually invoke methods which begin with '_' as they are meant for internal use within the JsonProxy.
Provides an interface to manage JSON data parity between FS and in-code.
Kind: inner property of json-data-proxy
Example
const JsonProxy = require('json-proxy');
Adds a listener to the queue.
Kind: instance method of JsonProxy
Returns: number
- Unique id for the listener.
Param | Type |
---|---|
listener | Array.<VoidFunction> |
Removes a listener from the queue.
Kind: instance method of JsonProxy
Param | Type | Description |
---|---|---|
id | number |
Unique id for the listener. |
Reconstructs the proxy to reflect latest changes. Warning: This will make the previous proxy object obsolete. This could be dangerous if the proxy object has been passed into other places.
Kind: instance method of JsonProxy
Updates the file to reflect the latest JSON state.
Kind: instance method of JsonProxy
Fired when an FS change is detected.
Kind: instance method of JsonProxy
Param |
---|
jsonProxy |
Destroys this instance of JsonProxy.
Kind: instance method of JsonProxy