This package has been deprecated

Author message:

moving to github.com/JustinBeaudry/metamon

denzel

4.1.0 • Public • Published

Denzel

npm version Build Status Coverage Status Maintainability

Share Data Representations (Models, Collections) between Node and the Browser

Read the DOCS

Denzel

Why?

Denzel is a toolkit for consistency with the representations of your data between Browsers and Node Servers. It provides methods for creating these representations and for indexing these representations.

Installation

Denzel is available via npm for Node, and bower for the Browser

Node

npm i -S denzel

Browser

Denzel has 3 bundles for your convenience:

Minified

const {Model, Collection, Enum} = require('denzel/dist/denzel.min.js');

Un-minified

const {Model, Collection, Enum} = require('denzel/dist/denzel.js');

CommonJS

const {Model, Collection, Enum} = require('denzel/dist/denzel.cjs.js');

You can install denzel via bower with:

bower install denzel

Usage

Read the DOCS

Using in Redux

Classes as state really don't play too well with redux. SEE: Why Not to Store Objects In Redux

In ReactRedux/Vuex

  // inside a reducer
  switch(action.type) {
    case 'LOAD_USERS': {
      return new PersonCollection(action.users, User).toArray(); 
    }
    default: {
      return state
    }
  }

Package Sidebar

Install

npm i denzel

Weekly Downloads

14

Version

4.1.0

License

MIT

Unpacked Size

3.7 MB

Total Files

78

Last publish

Collaborators

  • jnobo