New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

querent

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

querent

Easily query your js collections.

  • 1.0.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Querent

Syntax is based of SailsJS Waterline Query Language.

How it works

Run Querent.query(collection, filters) where collection is an array of objects and filters is an object like { surname: 'Simpson' }.

The property's key is the attribute that will be looked for in the object, and the value is the filter for the object to be returned.

Examples

You can add multiple attributes to narrow down your selection. { surname: 'Simpson', age: 10 } will return the elements that match both conditions.

Or you can widen it by allowing for multiple values. { surname: ['Simpson', 'Van Houten'] } will return the elements that match either value.

Another available structure is to negate the predicate by writing. { surname: { '!': 'Wiggum' } } will return the elements whose name is not Wiggum.

You can also filter using nested properties. { grades: { math: { '!': ['A', 'B'] } } } will return the elements whose grade on math not A or B.

Criteria Modifiers

The following modifiers are available to use when querying:

  • < (less than)
  • <= (less than or equal)
  • > (greater than)
  • >= (greater than or equal)
  • ! (not)

Build

You can build from source by running npm run build.

Tests

You can run the test suite by running npm run test.

FAQs

Package last updated on 07 Feb 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

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