# waterline-criteria

> Utility library for working with Waterline criterias. Especially useful when building Sails adapters for key/value databases.

Latest version **2.0.0** (published 2016-10-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install waterline-criteria
pnpm add waterline-criteria
yarn add waterline-criteria
bun add waterline-criteria
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2016-10-21 |
| First published | 2013-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Mike McNeil |
| Maintainers | balderdashy, mikermcneil, particlebanana, sgress454 |
| Keywords | waterline, criteria, sails, orm, utility |

## Links

- npm: https://www.npmjs.com/package/waterline-criteria
- Repository: https://github.com/balderdashy/waterline-criteria
- Homepage: https://github.com/balderdashy/waterline-criteria#readme
- Issues: https://github.com/balderdashy/waterline-criteria/issues
- npm.io page: https://npm.io/package/waterline-criteria

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) 3.10.1
- [flaverr](https://npm.io/package/flaverr.md) ^1.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2016-10-21
- 1.0.1 — 2016-06-06
- 1.0.0 — 2016-02-05
- 0.11.2 — 2015-09-11
- 0.11.1 — 2014-12-05
- 0.11.0 — 2014-09-10
- 0.10.7 — 2014-05-16
- 0.10.6 — 2014-04-18
- 0.10.5 — 2014-04-17
- 0.10.4 — 2014-04-17
- 0.10.3 — 2014-02-28
- 0.10.2 — 2014-02-28
- 0.10.1 — 2014-02-27
- 0.10.0 — 2014-02-14
- 0.9.7 — 2013-12-17
- … 8 more at https://npm.io/package/waterline-criteria/versions

## README

# waterline-criteria

Utilities for working with Waterline criterias, especially for applying them to in-memory datasets.

> This module was designed for adapters which communicate with key/value stores such as [`sails-disk`](https://github.com/balderdashy/sails-disk), [sails-memory](https://github.com/balderdashy/sails-memory), and [sails-redis](https://github.com/balderdashy/sails-redis) (i.e. they already implement the `semantic` interface, but need to implement the `queryable` interface).


## Installation

```sh
$ npm install waterline-criteria --save
```

## Usage

```js
var wlFilter = require('waterline-criteria');

var SOME_DATASET = [
  {
    id: 1,
    name: 'Lyra'
  },
  {
    id: 2,
    name 'larry'
  }
];

var results = wlFilter(SOME_DATASET, {
  where: {
    name: { contains: 'lyr' }
  }
}).results;

// x ==> [{name: 'Lyra', id: 1}]
```

## Bugs &nbsp; [![NPM version](https://badge.fury.io/js/waterline-criteria.svg)](http://npmjs.com/package/waterline-criteria)

To report a bug, [click here](http://sailsjs.com/bugs).

> This is a built-in module in the Sails framework and the `sails-disk` adapter.  It is installed automatically when you run `npm install sails`.

#### Version notes

The master branch of this repository holds `waterline-criteria` used in Sails versions 0.10.0 and up.  If you're looking for the version for the v0.9.x releases of Sails, the source is [located here](https://github.com/balderdashy/waterline-criteria/releases/tag/v0.9.7).

## Contributing &nbsp; [![Build Status](https://travis-ci.org/balderdashy/waterline-criteria.svg?branch=master)](https://travis-ci.org/balderdashy/waterline-criteria)

Please observe the guidelines and conventions laid out in the [Sails project contribution guide](http://sailsjs.com/contribute) when opening issues or submitting pull requests.

[![NPM package info](https://nodei.co/npm/waterline-criteria.png?downloads=true)](http://npmjs.com/package/waterline-criteria)

## License

The [Sails framework](http://sailsjs.com) is free and open-source under the [MIT License](http://sailsjs.com/license).

---
_Source: https://npm.io/package/waterline-criteria · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
