New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@ionx/enum

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ionx/enum

A simple, zero-dependency JavaScript enum implementation

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Simple Enum

A simple JavaScript enum implementation. It can be used in every way an enum should be usable.

Installation

Like any other node package yarn add @ionx/enum Not using yarn? You should be!

Usage

const Enum = require('@ionx/enum')

var Fruit = Enum(['Apple', 'Kiwi', 'Banana', 'Tangerine', 'DragonFruit'])

var bestFruit = Fruit.DragonFruit

// Additional properties
// Fruit.keys: an array of all keys
// Fruit.length: number of keys

Licence

Released under the MIT licence.

FAQs

Package last updated on 29 Aug 2017

Did you know?

Socket

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.

Install

Related posts