@js-bits/enumerate
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "@js-bits/enumerate", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Easy to use, Symbol-based enum implementation", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -72,3 +72,3 @@ # Easy to use, Symbol-based enum implementation | ||
## Primitive types | ||
## Primitive values | ||
@@ -86,2 +86,7 @@ By default `enumerate` converts values to [Symbols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol): | ||
console.log(enumerate(Number)`ZERO ONE TWO`); // { ZERO: 0, ONE: 1, TWO: 2 } | ||
// or | ||
const enumString = enumerate(String); | ||
const enumNumber = enumerate(Number); | ||
console.log(enumString`FOOT METER`); // { FOOT: 'FOOT', METER: 'METER' } | ||
console.log(enumNumber`ZERO ONE TWO`); // { ZERO: 0, ONE: 1, TWO: 2 } | ||
``` | ||
@@ -88,0 +93,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8113
108