This package has been deprecated

Author message:

this package has been depreacted with no alternative

responds

0.3.1 • Public • Published

respond Build Status Maintainability

A library to test for deeply nested properties of complicated JavaScript objects.

Installation

From within your project directory run:

npm install --save responds

Usage

Responds exposes two functions to test for the existence of properties buried deep within JavaScript objects.

const testable = new Responds(myObject);

testable.has('path.to.my.deeply.nested.property');
testable.hasFunction('path.to.my.deeply.nested.function');

The first of these functions tests that the object responds to any type of property, whilst the second specifically tests that the object responds to a function.

In addition to retrieve a property its path can be used.

const testable = new Responds(myObject);
testable.get('path.to.my.deeply.nested.property');

License

This project is licensed under the MIT License.

Package Sidebar

Install

npm i responds

Weekly Downloads

4

Version

0.3.1

License

MIT

Unpacked Size

319 kB

Total Files

19

Last publish

Collaborators

  • tomasbasham