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

smc-mongoose-query-builder-helper

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smc-mongoose-query-builder-helper - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "smc-mongoose-query-builder-helper",
"version": "1.0.4",
"version": "1.0.5",
"description": "Query builder helper for mongoose",

@@ -5,0 +5,0 @@ "scripts": {

@@ -28,10 +28,10 @@ # SMC Mongoose Query Builder Helper

// as an ObjectId which refers to departments collection
query = queryBuilder.objectIdMatcher(quey, 'department', req.query.department);
query = queryBuilder.objectIdMatcher(query, 'department', req.query.department);
// If you want to match an exact value. eg: the age of a person
query = queryBuilder.valueMatcher(quey, 'age', req.query.age);
query = queryBuilder.valueMatcher(query, 'age', req.query.age);
// If you want to match a pattern. eg: search for a name by providing
// one or two letters of that name.
query = queryBuilder.patternMatcher(quey, 'name', req.query.name);
query = queryBuilder.patternMatcher(query, 'name', req.query.name);

@@ -42,3 +42,3 @@ // If you want to find an opposite case of above patternMatcher.

// to find all non deleted users)
query = queryBuilder.patternUnMatcher(quey, 'status', req.query.status);
query = queryBuilder.patternUnMatcher(query, 'status', req.query.status);

@@ -49,7 +49,7 @@ // If you want to check whether your data values is one of among given set

const managerialRoles = ['senior_manager', 'manager', 'managerial_executive'];
query = queryBuilder.arrayElementMatcher(quey, 'user_role', managerialRoles);
query = queryBuilder.arrayElementMatcher(query, 'user_role', managerialRoles);
// If you want to find a numeric field that contains a given number
eg: you want to find users whose phone numbers contains '1234'
query = queryBuilder.numberPatternMatcher(quey, 'phone_number', 1234);
query = queryBuilder.numberPatternMatcher(query, 'phone_number', 1234);

@@ -56,0 +56,0 @@ // For further query buildings,

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