CIA Compliance Manager API Documentation - v0.8.5

    Variable safeAccess

    safeAccess: <T = any>(
        obj: any,
        path: string | (string | number)[],
        defaultValue?: T,
    ) => T

    Type declaration

      • <T = any>(obj: any, path: string | (string | number)[], defaultValue?: T): T
      • Safely access a nested property in an object using a dot notation path

        Type Parameters

        • T = any

        Parameters

        • obj: any

          The object to access

        • path: string | (string | number)[]

          The path to the property, e.g. 'a.b.c' or 'a[0].b.c'

        • OptionaldefaultValue: T

          The default value to return if the property doesn't exist

        Returns T

        The value at the path or the default value

    MMNEPVFCICPMFPCPTTAAATR