ts-enum-extractor
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

ts-enum-extractor

Library to help you extract a enum variables or keys.

Installation

To install ts-enum-extractor, use npm:

npm install ts-enum-extractor

Usage

enum DIRECTION {
   LEFT = 1,
   RIGHT = 2,
   UP = 3,
   DOWN = 4
 }
 
 // to get the keys of the enums
 
 console.log(enumExtractor.keys(DIRECTION))
 
 // to get the values of the enums
 
 console.log(enumExtractor.values(DIRECTION))

Readme

Keywords

none

Package Sidebar

Install

npm i ts-enum-extractor

Weekly Downloads

81

Version

1.0.4

License

ISC

Unpacked Size

10.1 kB

Total Files

8

Last publish

Collaborators

  • lalekidman