🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

object-dive

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-dive

object-dive takes a dot path string argument and searches an object that is then passed in to the returned function. This is useful for verifying that objects have certain properties and for retrieving those properties.

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
1
-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

object-dive

object-dive is a tiny module that searches an object for a specified property. If the property is found, its value is returned, otherwise it returns undefined.

Installation

Run npm install object-dive to install.

Basic usage

var objectSearch = require('object-dive')
  , pattern = objectSearch('levelOne.levelTwo')
  , obj = {
      levelOne : {
        levelTwo: 'You found me... Have some cake, the cake is a lie'
      }
    };

console.log(pattern(obj)); // -> 'You found me... Have some cake, the cake is a lie'

Tests

To run the tests you must npm install tap. Run the tests with npm test.

License

MIT

Keywords

property validation

FAQs

Package last updated on 11 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts