/json-proxy

Provides an interface to manage JSON data parity between FS and in-code

Primary LanguageTypeScript

This repo is now archived and has moved to a new repo at DaniAsh551/json-data-proxy

API Reference

Note:

#f03c15 Never manually invoke methods which begin with '_' as they are meant for internal use within the JsonProxy.

json-proxy~JsonProxy

Provides an interface to manage JSON data parity between FS and in-code.

Kind: inner property of json-proxy
Example

const JsonProxy = require('json-proxy');

jsonProxy.addListener(listener) ⇒ number

Adds a listener to the queue.

Kind: instance method of JsonProxy
Returns: number - Unique id for the listener.

Param Type
listener Array.<VoidFunction>

jsonProxy.removeListener(id)

Removes a listener from the queue.

Kind: instance method of JsonProxy

Param Type Description
id number Unique id for the listener.

jsonProxy._refreshProxy()

Reconstructs the proxy to reflect latest changes.

Kind: instance method of JsonProxy

jsonProxy._onContentChange(jsonProxy)

Fired when an FS change is detected.

Kind: instance method of JsonProxy

Param
jsonProxy

jsonProxy.destroy()

Destroys this instance of JsonProxy.

Kind: instance method of JsonProxy