Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coleslaw-models

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 19 May 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc