clay-collection

3.1.5 • Public • Published

Title Banner

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

Param Type Description
args *

License

This software is released under the Apache-2.0 License.

Links

/clay-collection/

    Package Sidebar

    Install

    npm i clay-collection

    Weekly Downloads

    19

    Version

    3.1.5

    License

    Apache-2.0

    Unpacked Size

    283 kB

    Total Files

    50

    Last publish

    Collaborators

    • okunishinishi
    • realglobe