Skip to content

tednoelker/optional-object-chaining

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Optional Object Chaining

A recursive check to test whether a property and any number of sub-keys are an object (similar to optional chaining).

Examples:

const colors = {
  orange: true,
  blue: false,
  red: {
    dark: true,
    light: false,
    seeAlso: ['pink'],
  },
};

isObject(colors) // true
isObject(colors, 'orange') // false
isObject(colors, 'red') // true
isObject(colors, 'red', 'dark') // false
isObject(colors, 'red', 'seeAlso') // true

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published