Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@js-bits/enumerate

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@js-bits/enumerate - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc