# config-obj

> Make object(class) configurable

Latest version **0.0.1** (published 2013-05-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install config-obj
pnpm add config-obj
yarn add config-obj
bun add config-obj
```

## 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.1 |
| Published | 2013-05-30 |
| First published | 2013-05-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | dong |
| Maintainers | dong |
| Keywords | config |

## Links

- npm: https://www.npmjs.com/package/config-obj
- Repository: https://github.com/ddliu/node-config-obj
- npm.io page: https://npm.io/package/config-obj

## 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.1 (latest) — 2013-05-30

## README

# node-config-obj

Make object or class configurable.

## Usage

```js
var configurable = require('config-obj');

var MyClass = function() {
    
};

MyClass.prototype.mainJob = function() {
    // do something

    // call the endSession method so that you can use session style configuration
    this.endSession(); 
}

configurable(MyClass);

var myInstance = new MyClass();
myInstance.option({
    option1: 'option1',
    option2: 'option2',
    //... 
});
myInstance.getOption('option1');

myInstance.session('option1', 'this value will only be applied only once').mainJob();
```

## Installation

Install it via npm:

```bash
npm install config-obj
```

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