node package manager

trait

Trait

Trait is a smart attribute manager.

Not traits in ruby, just because good names are already taken and even not used ╮(╯﹏╰)╭.

Installation

npm install trait --save

Usage

var trait = require('trait');

Methods

.get(name)

.get()

.set(name, value)

.set(values)

.writable()

.enumerable()

.reset(name)

.reset()

.add()

trait(attrs, options)

new trait.Trait(attrs, options)