clay-collection
v3.1.5
Published
Entity collection for ClayDB
Downloads
95
Readme
Entity collection for ClayDB
Installation
$ npm install clay-collection --save
Usage
'use strict'
const clayEntity = require('clay-entity')
const clayCollection = require('clay-collection')
{
let collection = clayCollection({
entities: [
clayEntity({ id: 1, title: 'Foo' }),
clayEntity({ id: 2, title: 'Bar' }),
],
meta: {
total: 100,
offset: 0,
limit: 2
},
filter: { foo: 'bar' }
})
/* ... */
}
API
[email protected]
Entity collection for ClayDB
- Functions
Functions
create(args) -> Collection
Create a Collection instance
| Param | Type | Description | | ----- | --- | -------- | | args | * | |
License
This software is released under the Apache-2.0 License.