Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seanmonstar/noom
Super simple Enum types
https://github.com/seanmonstar/noom
Last synced: about 1 month ago
JSON representation
Super simple Enum types
- Host: GitHub
- URL: https://github.com/seanmonstar/noom
- Owner: seanmonstar
- License: mpl-2.0
- Created: 2014-07-02T18:03:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-02T18:04:31.000Z (over 10 years ago)
- Last Synced: 2024-10-08T10:56:42.290Z (about 1 month ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# noom
Super simple Enums.
```js
var noom = require('noom');var Color = noom('RED', 'GREEN', 'BLUE');
var red = Color.RED;
assert.equal(red, Color.RED);
assert.notStrictEqual(red, 'RED'); //careful about type conversion ==
assert.equal(red + '', 'RED');
assert(red instanceof Color);
```