New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

property-drill

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

property-drill

Safely find deep properties in objects and arrays.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

property-drill

Safely find deep properties in objects and arrays.

Installation

With npm:

npm install --save property-drill

Or Yarn:

yarn add property-drill

Usage

var propDrill = require('property-drill')

var obj = {
   a: {
      b: ['c', 'd', 'e']
   }
}

var prop = propDrill(obj, `a`, `b`, 0) // Returns "c"

Why?

While there are tons of modules that do the same thing, many of them do not search within arrays or throw errors if you search deeper than the object is. The ones that meet these requirements take strings as your second argument. This can lead to innaccurate results when mixing objects and arrays and can also be much slower when more powerful regex is used.

Keywords

object

FAQs

Package last updated on 25 May 2018

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