Package Exports
- enum-keys-values-entries
- enum-keys-values-entries/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (enum-keys-values-entries) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
enum-keys-values-entries
Get just the keys (left hand side), values (right hand side), or entries (tuple of [key, value]) of a TypeScript enum.
Install
You can install via npm or yarn.
npm
npm install --save enum-keys-values-entries
yarn
yarn add enum-keys-values-entries
Usage
Keys
import { Enum } from 'enum-keys-values-entries';
enum MyEnum {
Cake = 1,
'Ice Cream' = 2,
Pie = 3,
}
const keys = Enum.keys(MyEnum);
const values = Enum.values(MyEnum);
const entries = Enum.entries(MyEnum);