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

babel-plugin-const-enum

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-const-enum - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

6

lib/const-object.js

@@ -39,3 +39,3 @@ "use strict";

value = constEnum[tsEnumMember.initializer.name];
validateConstEnumMemberAccess(value);
validateConstEnumMemberAccess(tsEnumMemberPath, value);
} else if (isNumericUnaryExpression(tsEnumMember.initializer) || isNumericBinaryExpression(tsEnumMember.initializer)) {

@@ -82,3 +82,3 @@ if (isStringEnum) {

const validateConstEnumMemberAccess = value => {
const validateConstEnumMemberAccess = (path, value) => {
if (value === undefined) {

@@ -94,3 +94,3 @@ throw path.buildCodeFrameError('Enum initializer identifier must reference a previously defined enum member.');

const value = constEnum[path.node.name];
validateConstEnumMemberAccess(value);
validateConstEnumMemberAccess(path, value);
path.replaceWith(_core.types.numericLiteral(value));

@@ -97,0 +97,0 @@ path.skip();

{
"name": "babel-plugin-const-enum",
"version": "0.0.1",
"version": "0.0.2",
"description": "Transform TypeScript `const` enums",

@@ -5,0 +5,0 @@ "repository": "https://github.com/dosentmatter/babel-plugin-const-enum",

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