Socket
Socket
Sign inDemoInstall

find-key

Package Overview
Dependencies
149
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

changelog.md

20

lib/index.js

@@ -15,18 +15,18 @@ 'use strict';

var name = keys[i];
var subkeys = obj[keys[i]];
var subkeys = obj[name];
if (typeof subkeys === 'object') {
if (name === key) {
results.push(subkeys);
if (name === key) {
results.push(subkeys);
}
findKey(subkeys, key, results);
}
findKey(subkeys, key, results);
} else {
if (name === key) {
if (name === key) {
if (results.indexOf(subkeys) === -1) {
results.push(subkeys);
}
}
if (results.indexOf(subkeys) === -1) {
results.push(subkeys);
}
}
}

@@ -33,0 +33,0 @@

{
"name": "find-key",
"version": "0.0.2",
"version": "0.0.3",
"description": "find value inside nested object from key name",

@@ -18,3 +18,3 @@ "main": "lib/index.js",

"scripts": {
"test": "lab -a code -v -t 100"
"test": "lab -a code -v -L -t 100"
},

@@ -21,0 +21,0 @@ "repository": {

@@ -6,3 +6,3 @@ #find-key

[![Build Status](https://travis-ci.org/simon-p-r/find-key.svg?branch=master)](https://travis-ci.org/simon-p-r/find-key)
[![Current Version](https://img.shields.io/npm/v/find-key.svg)](https://www.npmjs.org/package/require-plus)
[![Current Version](https://img.shields.io/npm/v/find-key.svg)](https://www.npmjs.org/package/find-key)
![devDependencies](http://img.shields.io/david/dev/simon-p-r/find-key.svg)

@@ -9,0 +9,0 @@

@@ -36,7 +36,7 @@

extra: {type: 'string', format: 'lookup'},
test: {type: 'string', format: {test: 'dbRef'}},
test: {type: 'string', format: {test: 'dbRef'}}
},
additionaProperties: false,
format: 'dbRef',
title: 'country schema',
title: 'country schema'

@@ -43,0 +43,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc