# mkconstants

> A utility function for recursively building an object of constants.

Latest version **0.0.4** (published 2015-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install mkconstants
pnpm add mkconstants
yarn add mkconstants
bun add mkconstants
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2015-07-17 |
| First published | 2015-03-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | James Cleveland |
| Maintainers | ratsupremacy |
| Keywords | constants, flux |

## Links

- npm: https://www.npmjs.com/package/mkconstants
- Repository: https://github.com/radiosilence/mkconstants
- Issues: https://github.com/radiosilence/mkconstants/issues
- npm.io page: https://npm.io/package/mkconstants

## Recent versions

- 0.0.4 (latest) — 2015-07-17
- 0.0.3 — 2015-03-09
- 0.0.2 — 2015-03-02
- 0.0.1 — 2015-03-02

## README

mkconstants
    ===========

    If you're building up a nested object of constants, for use with things like
    facebook/Flux, it's handy to have a function that can process said object
    and return something that can be compared upon. Also, namespaced on a per-
    app basis.

    So, for instance:

        mkconstants('ProductsApp', {
          ActionTypes: {
            Product: {
              RECEIVE_RAW_INSTANCE: null
            }
          },
          PayloadSources: {
            SERVER_ACTION: null,
            VIEW_ACTION: null
          }
        });

    Would output:
      
        {
          ActionTypes: {
            Product: {
              RECEIVE_RAW_INSTANCE: 'ProductsApp.ActionTypes.Product.RECEIVE_RAW_INSTANCE'
            }
          },
          PayloadSources: {
            SERVER_ACTION: 'ProductsApp.PayloadSources.SERVER_ACTION',
            VIEW_ACTION: 'ProductsApp.PayloadSources.VIEW_ACTION'
          }
        }

    These are not only unique, but also great for debugging purposes.

---
_Source: https://npm.io/package/mkconstants · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
