An open API service indexing awesome lists of open source software.

https://github.com/adrianmcli/js-state-encapsulation

Examples of state encapsulation in Javascript
https://github.com/adrianmcli/js-state-encapsulation

Last synced: 7 months ago
JSON representation

Examples of state encapsulation in Javascript

Awesome Lists containing this project

README

          

# Javascript state encapsulation (without classes!)

[![Build Status](https://travis-ci.org/adrianmcli/js-state-encapsulation.svg?branch=master)](https://travis-ci.org/adrianmcli/js-state-encapsulation)

An example of how you can encapsulate state (and even make it private) with just plain functions and object literals. No prototypes, `new`, or `this`!

There are also tests for everything (i.e. 100% coverage, just for fun).