# @rule.js/knex

> Serializable object assertions.

Latest version **0.17.1** (published 2020-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rule.js/knex
pnpm add @rule.js/knex
yarn add @rule.js/knex
bun add @rule.js/knex
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.17.1 |
| Published | 2020-02-20 |
| First published | 2019-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=v8.12.0 |
| Dependencies | 1 |
| Unpacked size | 18.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jonathan Boudreau |
| Maintainers | aghost7 |
| Keywords | Assertion, Conditional, Serialization, Storable, Conditions, Validation, SQL |

## Links

- npm: https://www.npmjs.com/package/@rule.js/knex
- Repository: https://github.com/AGhost-7/rule.js
- npm.io page: https://npm.io/package/@rule.js/knex

## Dependencies (1)

- [lodash.snakecase](https://npm.io/package/lodash.snakecase.md) ^4.1.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.17.1 (latest) — 2020-02-20
- 0.17.0 — 2019-10-04
- 0.16.1 — 2019-08-21
- 0.15.1 — 2019-08-02
- 0.15.0 — 2019-08-02
- 0.13.0 — 2019-05-11
- 0.12.0 — 2019-03-10
- 0.11.0 — 2019-02-24
- 0.10.0 — 2019-02-11
- 0.9.0 — 2019-01-20

## README

# Rule.js: KnexJs Module
Use your rule.js conditions with KnexJs!

Example:

```js
const Rule = require('@rule.js/core').extend({}, {
	knex: require('@rule.js/knex')()
})

const knex = require('knex')({ client: 'pg' })

knex('user')
	.select()
	.where(function() {
		Rule().equal('name', 'Joe Pass').knex(this)
	})
```

**Note**: This module automatically converts keys to snake case. If you don't
want it to do this, you can override it with:

```js
const Rule = require('@rule.js/core').extend({}, {
	knex: require('@rule.js/knex')(function(key) { return key })
})
```

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