|
|
@ -5,14 +5,14 @@
|
|
|
|
Setup this registry in your project .npmrc file:
|
|
|
|
Setup this registry in your project .npmrc file:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
@helpers:registry=https://gitea.node001.net/api/packages/HerrHase/npm/
|
|
|
|
@site-o-mat:registry=https://gitea.node001.net/api/packages/site-o-mat/npm/
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Install with npm or yarn
|
|
|
|
Install with npm or yarn
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
npm i --save-dev @helpers/siteomat-query
|
|
|
|
npm i --save-dev @site-o-mat/query
|
|
|
|
yarn add --dev @helpers/siteomat-query
|
|
|
|
yarn add --dev @site-o-mat/query
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Filter
|
|
|
|
## Filter
|
|
|
@ -20,7 +20,7 @@ yarn add --dev @helpers/siteomat-query
|
|
|
|
Basic Usage:
|
|
|
|
Basic Usage:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
import { Filter } from '@helpers/siteomat-query'
|
|
|
|
import { Filter } from '@site-o-mat/query'
|
|
|
|
|
|
|
|
|
|
|
|
const filter = new Filter(options)
|
|
|
|
const filter = new Filter(options)
|
|
|
|
const isValid = filter.validate(result)
|
|
|
|
const isValid = filter.validate(result)
|
|
|
@ -47,7 +47,7 @@ Skip or Limit Elements from a an Array.
|
|
|
|
Basic Usage:
|
|
|
|
Basic Usage:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
import { reduce } from '@helpers/siteomat-query'
|
|
|
|
import { reduce } from '@site-o-mat/query'
|
|
|
|
results = reduce({
|
|
|
|
results = reduce({
|
|
|
|
limit: 5
|
|
|
|
limit: 5
|
|
|
|
}, results)
|
|
|
|
}, results)
|
|
|
@ -67,7 +67,7 @@ Order elements in Array by name of property, default is 'asc', a '-' of the name
|
|
|
|
Basic Usage:
|
|
|
|
Basic Usage:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
import { orderBy } from '@helpers/siteomat-query'
|
|
|
|
import { orderBy } from '@site-o-mat/query'
|
|
|
|
results = orderBy([
|
|
|
|
results = orderBy([
|
|
|
|
-published_at
|
|
|
|
-published_at
|
|
|
|
], results)
|
|
|
|
], results)
|
|
|
|