Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

object-key-validator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-key-validator - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

package.json
{
"name": "object-key-validator",
"version": "1.1.1",
"version": "1.1.2",
"description": "check objects for the existence of certain keys",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -25,5 +25,7 @@ # object-key-validator

// checks to make sure an object has BOTH `a` AND `b` keys
// logically: (a && b)
{ $and: ['a', 'b'] }
// checks to make sure an object has `a`, `b`, AND `c` keys
// logically: (a && (b && c))
{

@@ -45,5 +47,7 @@ $and: [

// checks to make sure an object has EITHER `a` OR `b` keys
// logically: (a || b)
{ $or: ['a', 'b'] }
// checks to make sure an object has either an `a` key OR a `b` AND `c` key
// logically: (a || (b && c))
{

@@ -65,5 +69,7 @@ $or: [

// checks to make sure an object doesn't have EITHER `a` OR `b` keys
// logically: !(a || b)
{ $not: { $or: ['a', 'b'] } }
// checks to make sure an object doesn't have either an `a` key OR a `b` AND `c` key
// logically: !(a || (b && c))
{

@@ -70,0 +76,0 @@ $not: {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc