# getset

> Easier handling of configuration for client-based apps.

Latest version **0.7.0** (published 2015-07-04) · 0 weekly downloads

## Install

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

## 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.7.0 |
| Published | 2015-07-04 |
| First published | 2012-07-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Tomás Pollak |
| Maintainers | tomas |

## Links

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

## Recent versions

- 0.7.0 (latest) — 2015-07-04
- 0.6.3 — 2014-09-23
- 0.6.2 — 2014-08-01
- 0.6.1 — 2014-07-29
- 0.6.0 — 2014-07-27
- 0.5.5 — 2013-08-12
- 0.5.4 — 2013-08-06
- 0.5.3 — 2013-08-06
- 0.5.2 — 2013-08-05
- 0.5.1 — 2013-08-05
- 0.5.0 — 2013-08-05
- 0.4.1 — 2013-08-02
- 0.4.0 — 2013-07-27
- 0.3.3 — 2013-03-05
- 0.3.2 — 2012-12-21
- … 12 more at https://npm.io/package/getset/versions

## README

Getset
======

An easier way of handling config options for client-side apps. Specially when
it comes to changing settings and upgrading.

Usage
-----

``` js
var config = require('getset').load('/path/to/config/file');

config.set('foo', 'bar');
config.get('foo'); // 'bar'

config.save(function(err){
  if (!err) console.log('Saved successfully!')
})
```

Bells & whistles
----------------

``` js
var config = require('getset');

config.load('/file/that/will/be/read/asynchronously', function(err){

  if (!err) config.update('foo', 'bar'); // will set() and save()

  config.on('changed', function(){
    console.log('Hold on, someone just changed something!')
  })

  config.watch();
})
```

Features
--------

 - Singleton. Require from anywhere and you'll get the same object.
 - Uses a single, readable .ini file for persistence.
 - Restricts setting key/values to what's already in there.
 - Can sync with updated/new config files without overwriting existing values.
 - Can watch the config file for changes and reload + notify if it happens.
 - Has no dependencies.

Credits
-------

Written by Tomás Pollak.

Copyright
---------

(c) 2012 Fork Ltd. MIT licensed.

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