Socket
Socket
Sign inDemoInstall

coleslaw-models

Package Overview
Dependencies
6
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    coleslaw-models

The model builder can be used to generate Model instances from model defintions. Model instances have standard CRUD (create, retrieve, update, delete) functionality.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
4.27 MB
Created
Weekly downloads
 

Readme

Source

coleslaw-models

The model builder can be used to generate Model instances from model defintions. Model instances have standard CRUD (create, retrieve, update, delete) functionality.

Installation

$ npm install coleslaw-models --save

Usage

var modelBuilder = require('coleslaw-models').build

var options = {
    dataAccess: ...
}
var descriptions = require('./models')              // Locally defined models
var models = modelBuilder(descriptions, options)

var instance = new models.Example()                 // Inherits from require('coleslaw-models').Model
instance.set('value', 'Hello World!')
instance.save()                                     // Calls options.dataAccess.create()

Model features

  • fields
  • relationships
  • validation rules
  • authorization rules
  • access rules

FAQs

Last updated on 19 May 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc