3.1.5 • Published 7 years ago

clay-collection v3.1.5

Weekly downloads
215
License
Apache-2.0
Repository
github
Last release
7 years ago

Build Status npm Version JS Standard

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

clay-collection@3.1.4

Entity collection for ClayDB

Functions

create(args) -> Collection

Create a Collection instance

ParamTypeDescription
args*

License

This software is released under the Apache-2.0 License.

Links