New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

enumerated-type

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enumerated-type - npm Package Compare versions

Comparing version 0.5.10 to 0.5.12

4

index.js

@@ -248,6 +248,6 @@ 'use strict';

Object.defineProperty(this, keyName, {
value: function (key) {
value: function (key, defaultValue = UNDEFINED) {
return forEach.call(enumValues, (enumValue) => {
if (enumValue[keyName] === key) return BREAK(enumValue);
});
}) || defaultValue;
},

@@ -254,0 +254,0 @@ });

{
"name": "enumerated-type",
"version": "0.5.10",
"version": "0.5.12",
"description": "enum type for javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,2 +5,3 @@ # Version History

- [0.5.12](#0512)
- [0.5.8](#058)

@@ -18,2 +19,8 @@ - [0.5.6](#056)

## 0.5.12
* Add: optional `defaultValue` parameter to `value(id, defaultValue = undefined)` or
`[keyPropertyName](id, defaultValue = undefined)` to return if the passed in id does not match
any enum value.
## 0.5.8

@@ -20,0 +27,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