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

@magnetarjs/utils

Package Overview
Dependencies
Maintainers
3
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magnetarjs/utils - npm Package Compare versions

Comparing version 0.13.3 to 0.13.4

14

dist/index.js

@@ -105,2 +105,8 @@ "use strict";

}
function passesQuery(docData, queryClause) {
if ("and" in queryClause) {
return (0, import_is_what2.isArray)(queryClause.and) ? queryClause.and.every((whereClause) => passesWhere(docData, whereClause)) : passesQuery(docData, queryClause.and);
}
return (0, import_is_what2.isArray)(queryClause.or) ? queryClause.or.some((whereClause) => passesWhere(docData, whereClause)) : passesQuery(docData, queryClause.or);
}
function filterDataPerClauses(collectionDB, clauses) {

@@ -116,9 +122,9 @@ const queryClauses = clauses.query || [];

collectionDB.forEach((docData, docId) => {
const passesQuery = queryClauses.every((queryClause) => passesQuery(docData, queryClause));
if (!passesQuery)
const passedQuery = queryClauses.every((queryClause) => passesQuery(docData, queryClause));
if (!passedQuery)
return;
const passesWhereFilters = whereClauses.every(
const passedWhereFilters = whereClauses.every(
(whereClause) => passesWhere(docData, whereClause)
);
if (!passesWhereFilters)
if (!passedWhereFilters)
return;

@@ -125,0 +131,0 @@ entries.push([docId, docData]);

{
"name": "@magnetarjs/utils",
"version": "0.13.3",
"version": "0.13.4",
"sideEffects": false,

@@ -27,3 +27,3 @@ "description": "Magnetar utils like a logger for easier development",

"path-to-prop": "^2.0.2",
"@magnetarjs/types": "0.13.3"
"@magnetarjs/types": "0.13.4"
},

@@ -30,0 +30,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

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