Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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);
```