Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "object/deepest"

Index

Functions

Functions

deepest

  • deepest<T, K>(object: T, key: K): T

  • Example usage:

    import { deepest } from "@thalesrc/js-utils/object";
    
    const a = {
     x: null
    };
    
    const b = {
     x: a
    };
    
    const c = {
     x: b
    };
    
    deepest(c, 'x'); // {x: null} (a)
    

    Static usage example:

    import "@thalesrc/js-utils/object/static/deepest";
    
    const a = {
     x: null
    };
    
    const b = {
     x: a
    };
    
    const c = {
     x: b
    };
    
    Object.deepest(c, 'x'); // a

    Type parameters

    • T

    • K: object[keyof T]

    Parameters

    • object: T

      Object to deep dive

    • key: K

      key of the object which contains same type instance

    Returns T

Generated using TypeDoc