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
- Host: GitHub
- URL: https://github.com/adrianmcli/js-state-encapsulation
- Owner: adrianmcli
- Created: 2019-01-05T21:32:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-13T14:38:42.000Z (over 7 years ago)
- Last Synced: 2025-01-03T14:49:32.721Z (over 1 year ago)
- Language: JavaScript
- Size: 55.7 KB
- Stars: 19
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Javascript state encapsulation (without classes!)
[](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).