Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

TransitoryBliss/dget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dget

Build Status

Get a property from deep objects using string notation.

Installation

$ npm install dget --save

Usage

var obj, val, nonexsting;
obj = {
    some: {
        prop: {
            deep: "Hello world!"
        }
    }
}
val = dget('some.prop.deep', obj);
console.log(val); // "Hello world!"
nonexisting = dget('non.existing.prop', obj)
console.log(nonexisting); // undefined

Testing

$ npm test

License

BSD

About

Get a property from deep objects using string notation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published