Strukt

Structs for JavaScript inspired by Ruby

Ruby Structs are an awesome way to add several attributes to a class. Inspired by these, Strukt provides a similiar minimalistic API for node and the browser. It allows you to quickly create constructor functions with less code.

Installation

Node

$ npm install strukt

var Strukt =require('strukt');

Browser

Grab lib/strukt.js and include it in your HTML document. If an AMD or CommonJS loader is present it will be used, otherwise Strukt is assigned to window.Strukt.