@beenhere4hours/valid-chain

1.0.4 • Public • Published

Build Status

valid-chain

Verify deep nested property exists

Installation

npm i @beenhere4hours/valid-chain

Usage

const validChain = require("../index").validChain;

// first param is the object to search
// second param is a string dot notated list of params to be verified
validChain({level1: {level2: {level3: {level4: true}}}}, 'level1.level2.level3.level4');
// expect true

validChain({level1: {level2: {level3: {level4: true}}}}, 'level1.level2.level3.level4.level5');
// expect false

Tests

npm test

Readme

Keywords

Package Sidebar

Install

npm i @beenhere4hours/valid-chain

Weekly Downloads

5

Version

1.0.4

License

MIT

Unpacked Size

3.37 kB

Total Files

6

Last publish

Collaborators

  • beenhere4hours