# RefTools ## Functions
a no-op placeholder which returns the given object unchanged useful for when a clone function needs to be passed but cloning is not required
clones the given object using JSON.parse and JSON.stringify
clones the given object's properties shallowly, ignores properties from prototype
clones the given object's properties deeply, ignores properties from prototype
clones the given object's properties shallowly, using Object.assign
Source: stackoverflow http://bit.ly/2A1Kha6
dereferences the given object
flattens an object into an array of properties
escapes JSON Pointer using ~0 for ~ and ~1 for /
unescapes JSON Pointer using ~0 for ~ and ~1 for /
from obj, return the property with a JSON Pointer prop, optionally setting it to newValue
recurses through the properties of an object, given an optional starting state anything you pass in state.payload is passed to the callback each time
Simply modifies an object to have no self-references by replacing them with $ref pointers
Takes an object and creates a graph of JSON Pointer / References
Given an expanded object and an optional object to compare to (e.g. its $ref'd form), will call the following functions:
Result
Try to get a topological sorting out of directed graph.
Result
](#Result)
Try to get a topological sorting out of directed graph.
**Kind**: global typedef
| Param | Type | Description |
| --- | --- | --- |
| nodes | Object
| A list of nodes, including edges (see below). |
**Properties**
| Name | Type | Description |
| --- | --- | --- |
| sort | array
| the sort, empty if not found |
| nodesWithEdges, | array
| will be empty unless a cycle is found |