Home

Awesome

Design Patterns JS Coverage Status

Here you will find the 23 (GoF) design patterns implemented in JavaScript using both prototype and ES6 classes. You can use the docs.md to quicky overview the examples.

Follows the list of patterns separed by type:

Creational Patterns

Creational patterns are ones that create objects for you, rather than having you instantiate objects directly. This gives your program more flexibility in deciding which objects need to be created for a given case.

Structural Patterns

These concern class and object composition. They use inheritance to compose interfaces and define ways to compose objects to obtain new functionality.

Behavioral Patterns

Most of these design patterns are specifically concerned with communication between objects.

Testing

To run the tests you just need to execute the following commands inside the project root folder:

npm install
npm test

TODO

Some patterns still need to be implemented using ES6 classes.

Notes