• Provides a way to safely batch set an objects data / entries given an array of accessor strings which describe the entries to walk. To access deeper entries into the object format the accessor string with . between entries to walk. If value is an object the accessor will be used to access a target value from value which is subsequently set to data by the given operation. If value is not an object it will be used as the target value to set across all accessors.

    Parameters

    • data: object

      An object to access entry data.

    • accessors: string[]

      A string describing the entries to access.

    • value: any

      A new value to set if an entry for accessor is found.

    • Optionaloperation: SafeSetOperation

      Operation to perform including: 'add', 'div', 'mult', 'set', 'set-undefined', 'sub'.

    • OptionaldefaultAccessValue: any

      A new value to set if an entry for accessor is found.

    • OptionalcreateMissing: boolean

      If true missing accessor entries will be created as objects automatically.

    Returns void