# file-setting

> ## Usage

Latest version **0.0.3** (published 2016-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install file-setting
pnpm add file-setting
yarn add file-setting
bun add file-setting
```

## 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.3 |
| Published | 2016-06-16 |
| First published | 2016-06-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mora |
| Maintainers | qiu8310 |

## Links

- npm: https://www.npmjs.com/package/file-setting
- npm.io page: https://npm.io/package/file-setting

## Recent versions

- 0.0.3 (latest) — 2016-06-16
- 0.0.2 — 2016-06-16
- 0.0.1 — 2016-06-16

## README

# file-setting

## Usage

```js
const FileSetting = require('file-setting');

var setting = new FileSetting('/path/to/cache/file');

// sync
setting.initSync();
setting.setSync('sync', true);
setting.getSync('sync'); // true


// or async
setting.init()
  .then(function () {
    return setting.set('async', true);
  })
  .then(function () {
    return setting.get('async');
  })
  .then(function (async) {
    // async should be true
  })


// or define
setting.initSync();
setting.setSync('foo', 'x');

setting.define(); // use defineProperty set all keys to setting object
setting.foo = 'xx';
console.log(setting.foo); // return "xx"

```

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