Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Properties

Properties

default

default: { getByKey: (source: object, target: string, delimiter?: string) => any; removeNullish: (source: object) => {} & object }

Type declaration

  • getByKey: (source: object, target: string, delimiter?: string) => any
      • (source: object, target: string, delimiter?: string): any
      • FindKey by key string

        can use dot notation for deep nested value

        eg:

        import NOM from 'nested-object-mutator'
        
        const source = {
         a: 1,
         b: {
           c: 2
         }
        }
        
        const result = NOM.getByKey(source, "a.b.c", ".")
        
        The result is `2`. return null if not exists.
        

        Parameters

        • source: object
        • target: string

          target key.

        • delimiter: string = "."

          default delimiter is .

        Returns any

        true if exist

  • removeNullish: (source: object) => {} & object
      • (source: object): {} & object
      • Remove Nullish value.

        nullish : undefined, null

        Parameters

        • source: object

        Returns {} & object

        Object

Generated using TypeDoc