Skip to content
/ triable Public

Get an object's props without check if the prop exist

License

Notifications You must be signed in to change notification settings

xiunen/triable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Triable

Get an object's props without check if the prop exist

How to use

var Triable = require('triable');
var foo = {
  bar: {
    foobar: 'test'
  }
}
var instance = new Triable(foo);
instance.try('bar').try('foobar').getValue(); //=> test
instance.try('bar').try('foobar').try('something').try('somethingelse').getValue(); //=> undefined

About

Get an object's props without check if the prop exist

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published