# ds

> Simple data store for prototyping

Latest version **2.0.2** (published 2023-11-14) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2023-11-14 |
| First published | 2011-12-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joe Hitchens |
| Maintainers | sleeplessinc |

## Links

- npm: https://www.npmjs.com/package/ds
- Repository: https://github.com/sleeplessinc/ds
- Homepage: https://github.com/sleeplessinc/ds#readme
- Issues: https://github.com/sleeplessinc/ds/issues
- npm.io page: https://npm.io/package/ds

## Recent versions

- 2.0.2 (latest) — 2023-11-14
- 2.0.1 — 2023-11-14
- 2.0.0 — 2023-11-11
- 1.4.2 — 2016-10-09
- 1.4.1 — 2015-10-20
- 1.0.0 — 2011-12-08
- 1.0.1 — 2011-12-08
- 1.1.0 — 2011-12-08
- 1.2.0 — 2011-12-08
- 1.4.0 — 2011-12-08

## README

# DS (data store)

This is a simple data store intended for prototyping.
It will let you persist JS objects to disk with very little effort in JSON form.

DS is:

* Easy to install
* Easy to use
* Free!

DS is NOT:

* Smart
* Secure
* Scaleable
* Flexible
* Featureful

*** Do not use this in production. ***

## Install

	npm install ds

## Example

	var DS = require("ds").DS

	// if no argument, "./ds.json" is used
	// constructore calls load()
	var ds = new DS("./ds.json")

	ds.one = 1
	ds.a = [1,2,"foo"]
	ds.o = {bar:"baz", qux:42}
	ds.save()		// data (all of it) written to ./ds.json
	ds.clear()		// all data erased

## API

	load(path)		// load JSON data from file into memory
					// if path not provided, path provided to constructor is used
	save(path)		// save JSON data to a specific file
	save()			// save JSON data to same file as last time
	clear()			// clear the in-memory data store

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