# node-constants

> Small library for defining constants for your modules

Latest version **0.0.2** (published 2014-04-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-constants
pnpm add node-constants
yarn add node-constants
bun add node-constants
```

## 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.2 |
| Published | 2014-04-18 |
| First published | 2014-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.4 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 40 |
| Author | Dominic Barnes |
| Maintainers | dominicbarnes |
| Keywords | constants, modules |

## Links

- npm: https://www.npmjs.com/package/node-constants
- Repository: https://github.com/dominicbarnes/node-constants
- Homepage: http://github.com/dominicbarnes/node-constants
- Issues: https://github.com/dominicbarnes/node-constants/issues
- npm.io page: https://npm.io/package/node-constants

## Recent versions

- 0.0.2 (latest) — 2014-04-18

## README

# node-constants

A small library for defining module-level constants.

Check for further examples in the `examples` folder.
Also, the source code is really small and well documented.

**NOTE:** newer versions of node use the name
["constants"](https://github.com/joyent/node/blob/master/lib/constants.js)
internally, which clobbers any attempt to use this library. As a result,
I've had to rename to the more verbose,
["node-constants"](https://www.npmjs.org/package/node-constants).

## Basic Usage

    var define = require("node-constants")(exports);
    // define is a function that binds "constants" to an object (commonly exports)

    // a single constant
    define("PI", 3.14);

    // or multiple
    define({
        DAYS_IN_WEEK: 7,
        SECONDS_IN_MINUTE: 60
    });

## Installation

    npm install --save node-constants

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