
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
JavaScript enumerable type.
instanceof
operator.
MyEnum.contant instanceof MyEnumnew Enum({ foo: "value" })Enum1.foo !== Enum2.fooconst Enum = require("enum-class");
var MyEnum = Enum.create("foo", "bar");
MyEnum.foo.valueOf(); // 0
MyEnum.bar.valueOf(); // 1
MyEnum.foo.toString(); // "foo"
MyEnum.bar.toString(); // "bar"
MyEnum.foo === 0; // false
MyEnum.foo === "foo"; // false
MyEnum.get("foo"); // MyEnum.foo
{ [foo.foo]: true }; // { "foo": true }
MyEnum.names; // [ "foo", "bar" ]
MyEnum.values; // [ 0, 1 ]
MyEnum.constants; // [ MyEnum.foo, MyEnum.bar ]
MyEnum instanceof Enum; // true
MyEnum.foo instanceof Enum; // true
MyEnum.foo instanceof MyEnum; // true
var MyEnum = Enum.create({ foo: 2, bar: 4 });
MyEnum.foo.valueOf(); // 2
MyEnum.foo.valueOf(); // 4
MyEnum.foo.toString(); // "foo"
MyEnum.bar.toString(); // "bar"
Return a new Enum instance with the defined constants.
Return a list of the enum names.
Return a list of the enum values.
Return a list of the enum constants.
Return the enum constant that matches name.
Return the constant name string.
Return the contant value.
FAQs
Unknown package
The npm package enum-class receives a total of 2 weekly downloads. As such, enum-class popularity was classified as not popular.
We found that enum-class demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.