enum-keys-values-entries
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.2 • Public • Published

    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.

    GitHub release Build Status codecov Codacy Badge

    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);

    Install

    npm i enum-keys-values-entries

    DownloadsWeekly Downloads

    63

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    4.37 kB

    Total Files

    4

    Last publish

    Collaborators

    • bameyrick