Skip to content

zushenyan/Design-Patterns-In-ES6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns in ES6

es6

Purpose

There are already tons of design pattern learning resources on the web, but one can't really learning by reading, right? Especially in software development field, the best way to learn one thing is by doing it yourself.

Aside from this, I found almost all the resources are written in ES5. ES6 has out for awhile, and it's not a problem anymore since we have transpilers like Babel, TypeScript or CoffeeScript..., so, by the power of module and class, let's classify all the things!!!

Edit: Serously, don't do this, not everything in JavaScript has to be class. Sometimes, function is enough and more elegant.

By the way, I write this base on Learning JavaScript Design Patterns, it really helps me out from the muddy crappy structure I had.

Run Examples

Make sure you have Nodejs. If you don't have one, use Homebrew to get one brew install nodejs.

Use node Design-Patterns-In-ES6/Creational_Patterns/Singleton/compiled/Main.js to run whichever example you want.

By the time it was written, Nodejs still not fully support ES6, so I use Babel to transpile codes into ES5.

References

About

🤘🤘Classify all the things!🤘🤘

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published