# hive-configuration

> Simple light-weight configuration and setting module extending EventEmitter; branched from configuration (Thomas Fritz )

Latest version **0.0.1a** (published 2013-02-10) · 0 weekly downloads

## Install

```sh
npm install hive-configuration
pnpm add hive-configuration
yarn add hive-configuration
bun add hive-configuration
```

## 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.1a |
| Published | 2013-02-10 |
| First published | 2012-12-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.6.x |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Dave Edelhart |
| Maintainers | bingomanatee |
| Keywords | hive, configuration, config, setup, configure, settings |

## Links

- npm: https://www.npmjs.com/package/hive-configuration
- Repository: https://github.com/thomasfr/node-configuration
- npm.io page: https://npm.io/package/hive-configuration

## Dependencies (1)

- [underscore](https://npm.io/package/underscore.md) ~1.3.3

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.0.1a (latest) — 2013-02-10
- 0.0.1 — 2012-12-08

## README

[![build status](https://secure.travis-ci.org/thomasfr/node-configuration.png)](http://travis-ci.org/thomasfr/node-configuration)
Configuration
=============

Light-Weight module for node.js to help you to configure your node.js module(s) or
administer your settings.

 this branch of configuration has a small but significant difference: setting object or array values
to a field with existing values of the same type will produce in a union of the data. See `test/tap_test.js` for details of usage.
Installation
============

```
npm install hive-configuration
```

Usage
=====

```
var Configuration = require('Configuration');

var defaultConfig = {
    host: "localhost",
    port: 1234
};
var config = new Configuration(defaultConfig);

config.on('change', function(key, value) {
    console.log("value of '" + key + "' has changed to '" + value + "'");
});

// This also works for 'add' and 'remove' events.
config.on('change:host', function(newValue) {
    console.log("config key 'host' was changed to '" + newValue + "');
});

config.on('set', function(key, value) {
    console.log("new config '" + key + "' added. Value: '" + value + "'");
});

config.on('remove', function(key) {
    console.log("config with '" + key + "' gets removed");
});


config.set("host", "192.168.0.1");
config.set("featureFoo", true);

console.log("has featureFoo? ", config.has("featureFoo");

// Resets its internal values to the default values given at creation @see: defaultConfig
config.reset();

// will output 'localhost' and not '192.168.0.1'
console.log(config.get("host"));

// Removes all config values. Even default values.
config.removeAll();

// Will output true after removeAll() otherwise false ;)
console.log(config.isEmpty());


```

LICENSE
=======

Copyright (c) 2012 Thomas Fritz

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

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