# jsop

> One-way data-binding for JSON files

Latest version **0.3.1** (published 2015-04-09) · MIT license · 0 weekly downloads

## Install

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

## 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.3.1 |
| Published | 2015-04-09 |
| First published | 2014-08-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 210 |
| Author | Typicode |
| Maintainers | typicode |
| Keywords | JSON, open, data |

## Links

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

## Dependencies (2)

- [steno](https://npm.io/package/steno.md) ^0.3.2
- [observed](https://npm.io/package/observed.md) ^1.1.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.3.1 (latest) — 2015-04-09
- 0.3.0 — 2015-03-12
- 0.2.1 — 2015-02-10
- 0.2.0 — 2015-01-14
- 0.1.0 — 2014-08-06

## README

# jsop [![](https://travis-ci.org/typicode/jsop.svg?branch=master)](https://travis-ci.org/typicode/jsop) [![](https://badge.fury.io/js/jsop.svg)](https://www.npmjs.com/package/jsop)

> One-way data binding for JSON files

jsop is a __new__ kind of JSON file reader/writer for __Node 0.12__ and __io.js__ powered by Object.observe.

## Before

```javascript
var fs = require('fs')

var config = JSON.parse(fs.readFileSync('config.json'))
config.foo = 'bar'
fs.writeFile('config.json', JSON.stringify(config), function(err) {
  if (err) throw err
})
```

## After

```javascript
var jsop = require('jsop')

var config = jsop('config.json')
config.foo = 'bar'
```

_Changes are automatically written to file. If file doesn't exist, it will be created._

## License

MIT - [Typicode](https://github.com/typicode)

_* jsop is short for jsonOpen_

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