Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@krknet/lowmodel

KRKnetwork43MIT1.2.2

BaseModel for LowDB

readme

LowModel

BaseModel for LowDB

Installing

npm i @krknet/lowmodel

Usage

const BaseModel = require('@krknet/lowmodel')

// the name of the LowDB Collection
const dbrep = 'accounts'
// Object Schema
const schema = {
  id: null,
  mail: null,
  name: null,
  role: null,
  passphrase: null
}

module.exports = class Account extends BaseModel {

  static get dbrep () { return db.get(dbrep) }

  static get _modelSchema () { return schema }
}

Developing

Issue List: https://gitlab.com/KRKnetwork/lowmodel/issues

js-standard-style