0.3.1 • Published 7 years ago

node-try v0.3.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

node-try Build Status devDependency Status Greenkeeper badge

npm install node-try

Try for Node, based on Ruby's try.

Usage

Import the nodeTry method:

import nodeTry from 'node-try';

Then you can access object properties via dot notation without throwing an exception by using #nodeTry as the getter.

For example, given the following object of:

var stuff = {
  foo: 'bar'
};

You then have access to foo via stuff.nodeTry('foo').

If you were to write stuff.nodeTry('notFoo'), an empty object would be returned.

Development

Run npm run build to build to dist/index.js (entry point for this package).

Note: npm run build is automatically run via the prepublish hook as per package.json.

Further Reading

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago