3.1.0 • Published 7 years ago

go-patterns v3.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

go-patterns

JavaScript Design-Patterns Builder

Installation

  1. npm install --save go-patterns
  2. import patterns from 'go-patterns';

Usage

See docs for more patterns and information.

A simple example is the singleton, which the idea behind it is that you can only create a single instance from a class.

import patterns from 'go-patterns';

let Singleton = patterns.singleton().build();

console.log(new Singleton() === new Singleton()) // true