ixfx
    Preparing search index...

    Namespace Records

    Functions for working with simple objects

    Functions

    changedObjectDataFields

    Returns the changed fields from A -> B. It's assumed that A and B have the same shape. ie. returns an object that only consists of fields which have changed in B compared to A.

    cloneFromFields
    compareArrays

    Produces a CompareChangeSet between two arrays.

    compareObjectData

    Compares A to B. Assumes they are simple objects, essentially key-value pairs, where the values are primitive values or other simple objects. It also works with arrays.

    compareObjectKeys

    Compares the keys of two objects, returning a set of those in common, and those in either A or B exclusively.

    enumerateNumericalValues

    Yields numerical values based on the an input of objects and the property to use.

    getRecordEntryByPath

    Returns the closest matching entry, tracing path in an array, Map or simple object. Returns an entry with undefined value at the point where tracing stopped. Use traceRecordEntryByPath to step through all the segments.

    keysToNumbers

    Returns a copy of object with integer numbers as keys instead of whatever it has.

    mapObjectByObject

    Maps the contents of data using mapper as a structured set of map functions.

    mapObjectKeys

    Maps the keys of an object, returning a transformed object.

    const input = {
    hello: `there`,
    chap: `chappie`
    mapObjectShallow

    Maps the top-level properties of an object through a map function. That is, run each of the values of an object through a function, setting the result onto the same key structure as original.

    mergeObjects
    prefixProperties

    Returns a new object based on data but with all properties prefixed by prefix.

    prettyPrintEntries

    Helper function to get a 'friendly' string representation of an array of RecordEntry.

    recordChildren

    Returns the direct children of a tree-like object as a pairing of node name and value. Supports basic objects, Maps and arrays.

    recordEntriesDepthFirst
    recordEntryPrettyPrint

    Returns a human-friendly debug string for a tree-like structure

    removeCircularReferences
    traceRecordEntryByPath

    Enumerates over children of node towards the node named in path. This is useful if you want to get the interim steps to the target node.

    zipRecords

    Merge corresponding objects from arrays a and b.

    References

    ChangeKind → ChangeKind
    ChangeRecord → ChangeRecord
    CompareChangeSet → CompareChangeSet

    Type Aliases

    MapObjectArgs
    PathOpts

    Options for parsing a path

    RecordChildrenOptions
    RecordEntry
    RecordEntryStatic
    RecordEntryWithAncestors
    Spread