New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

denzel

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

denzel

model, and collection library for class based or pojo models

latest
Source
npmnpm
Version
4.1.0
Version published
Weekly downloads
12
50%
Maintainers
1
Weekly downloads
 
Created
Source

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
    }
  }

Keywords

models

FAQs

Package last updated on 27 May 2018

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