vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Function flattenObject

    • Flatten an object with nested objects to a flat structure in which nested objects can be accessed directly using a key separator. I.e:

      flattenNestedObject({ foo: { bar: 'test' } }); // { 'foo.bar': 'test' }
      

      Creates a new object and does not alter the existing structure

      Type Parameters

      • T extends object

      Parameters

      • values: T

        Object to flatten

      • OptionalflattenPredicate: (obj: any) => any

        when this predicate returns false the object will not be flattened otherwise; if not set all objects will be flattened

      • separator: string = '.'

        optional separator

      • OptionalkeyPrefix: string

        key which will prefixes the new keys

      Returns T