# define-constant

> define constant in nodejs or window

Latest version **1.0.0** (published 2014-07-20) · 0 weekly downloads

## Install

```sh
npm install define-constant
pnpm add define-constant
yarn add define-constant
bun add define-constant
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-07-20 |
| First published | 2014-07-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | cloudcome |
| Maintainers | cloudcome |
| Keywords | constant, define, const |

## Links

- npm: https://www.npmjs.com/package/define-constant
- Repository: https://github.com/cloudcome/define-constant
- Issues: https://github.com/cloudcome/define-constant/issues
- npm.io page: https://npm.io/package/define-constant

## Recent versions

- 1.0.0 (latest) — 2014-07-20

## README

# define-constant[![NPM version](https://img.shields.io/npm/v/define-constant.svg?style=flat)](https://npmjs.org/package/define-constant)[![spm version](http://spmjs.io/badge/define-constant)](http://spmjs.io/package/define-constant)

define constant in nodejs or window


#USAGE

## 1. nodejs
```
global.CONFIG = {};
var constant = require('define-constant')(global.CONFIG);

constant('a', 1);
constant('b', {
	a: 1,
	b: 2
});
```

## 2. window
```
window.CONFIG = {};
var constant = require('define-constant')(window.CONFIG);

constant('a', 1);
constant('b', {
	a: 1,
	b: 2
});
```

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