Query Functions for Site-O-Mat
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HerrHase ae603c64b0
change naming
1 month ago
src adding 2 months ago
test adding 2 months ago
.gitignore init 2 months ago
LICENSE adding 2 months ago
README.md change naming 1 month ago
index.js adding 2 months ago
package-lock.json adding 2 months ago
package.json change naming 1 month ago


Site-O-Mat Query


Setup this registry in your project .npmrc file:


Install with npm or yarn

npm i --save-dev @site-o-mat/query
yarn add --dev @site-o-mat/query


Basic Usage:

import { Filter } from '@site-o-mat/query'

const filter = new Filter(options)
const isValid = filter.validate(result)


Name Type Description
_eq {Mixed} is equal
_neq {Mixed} is not equal
_in {Mixed} in array
_lt {Mixed} is lesser than
_lte {Mixed} is lesser or equal than
_gt {Mixed} is greater than
_gte {Mixed} is greater or equal than
_null {Boolean} is null
_nnull {Boolean} is not null


Skip or Limit Elements from a an Array.

Basic Usage:

import { reduce } from '@site-o-mat/query'
results = reduce({
	limit: 5
}, results)


Name Type Description
limit {Number} limit elements
offset {Number} skip elements


Order elements in Array by name of property, default is 'asc', a '-' of the name is 'desc'.

Basic Usage:

import { orderBy } from '@site-o-mat/query'
results = orderBy([
], results)