Skip to content

Glossary: Software Design Patterns in JavaScript

Singleton

A class that allows only one instance and hands everyone that same instance. In JavaScript an ES module already behaves this way, so its exported values are shared.

Where the book teaches it

Related terms

ES moduleGlobal mutable state