Skip to content
Pull request Compare This branch is 160 commits behind shichuan:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
design-patterns
function-patterns
general-patterns
jquery-patterns
README.md

README.md

JavaScript Patterns

JS Patterns
Common JS Patterns based on the ideas of Stoyan Stefanov, Paul Irish, John Resig, Mathias Bynens, Addy Osmani, Dustin Diaz and many others.

Design Patterns

Creational

  • Abstract factory
  • Builder (added)
  • Factory method (added)
  • Prototype
  • Singleton (added)

Structural

  • Adapter
  • Bridge
  • Composite
  • Decorator (added)
  • Facade (added)
  • Flyweight
  • Proxy (added)

Behavioral

  • Chain of responsibility (added)
  • Command (added)
  • Interpreter
  • Iterator (added)
  • Mediator (added)
  • Memento
  • Observer (added)
  • State
  • Strategy (added)
  • Template method
  • Visitor

Function Patterns

API patterns

  • Callback patterns
  • Configuration objects
  • Returning functions
  • Currying

Initialization patterns

  • Immediate functions
  • Immediate object initialization
  • Init-time branching

Performance patterns

  • Memoization
  • Self-defining functions
Something went wrong with that request. Please try again.