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

enum

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enum - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

16

dist/enum.js

@@ -59,5 +59,3 @@ "use strict";

for (var member in map) {
if (this._options.name && ["name", "_options", "get", "getKey", "getValue", "enums", "isFlaggable"].includes(member)) {
throw new Error("Enum key \"" + member + "\" is a reserved word!");
}
guardReservedKeys(this._options.name, member);
this[member] = new EnumItem(member, map[member], { ignoreCase: this._options.ignoreCase });

@@ -282,2 +280,12 @@ this.enums.push(this[member]);

module.exports = Enum;
module.exports = Enum;
// private
var reservedKeys = ["_options", "get", "getKey", "getValue", "enums", "isFlaggable"];
function guardReservedKeys(customName, key) {
if (customName && key === "name" || indexOf.call(reservedKeys, key) >= 0) {
throw new Error("Enum key " + key + " is a reserved word!");
}
}
{
"author": "adrai",
"name": "enum",
"version": "2.0.1",
"version": "2.0.2",
"private": false,

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

@@ -24,4 +24,4 @@ # Introduction

|:------------|:----------------|:---------|
| `enum-2.0.1.js` | *uncompressed, with comments* | [Download](https://raw.github.com/adrai/enum/master/enum-2.0.1.js) |
| `enum-2.0.1.min.js` | *compressed, without comments* | [Download](https://raw.github.com/adrai/enum/master/enum-2.0.1.min.js) |
| `enum-2.0.2.js` | *uncompressed, with comments* | [Download](https://raw.github.com/adrai/enum/master/enum-2.0.2.js) |
| `enum-2.0.2.min.js` | *compressed, without comments* | [Download](https://raw.github.com/adrai/enum/master/enum-2.0.2.min.js) |

@@ -28,0 +28,0 @@ # Installation (node.js)

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