Skip to content

ntharim/dot-access

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dot-access

Access object properties using dot notation.

var dotAccess = require('dot-access');

var user = { 
  fullname: { 
    first: 'Joe', 
    last: 'M' 
  } 
};

// get
dotAccess.get(user, 'fullname.first'); // 'Joe'

// or set
dotAccess.set(user, 'fullname.last', 'T'); // 'T'

Installation

Install with component(1):

$ component install nthtran/dot-access

API

License

MIT

About

Access object properties using dot notation.

Resources

Stars

Watchers

Forks

Packages

No packages published