# global-data-manager

> Save project-global variables in one location, manage and access them anywhere

Latest version **0.0.1** (published 2018-06-20) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install global-data-manager
pnpm add global-data-manager
yarn add global-data-manager
bun add global-data-manager
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-06-20 |
| First published | 2018-06-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Spencer Tuft |
| Maintainers | stuft2 |
| Keywords | [, "global", "data", "store", "save", "variables", "manager", ] |

## Links

- npm: https://www.npmjs.com/package/global-data-manager
- Repository: https://github.com/SpencerTuft/global-data-manager
- Homepage: https://github.com/SpencerTuft/global-data-manager#readme
- Issues: https://github.com/SpencerTuft/global-data-manager/issues
- npm.io page: https://npm.io/package/global-data-manager

## Recent versions

- 0.0.1 (latest) — 2018-06-20
- 0.0.0 — 2018-06-20

## README

# global-data-manager
##### Save project-global variables in one location, manage and access them anywhere

### Introduction
This module originally served to store server configurations in a single location and accessing/changing them throughout the server files as necessary.
I've since come across dozens of similar scenarios since that have led to the creation of this module.
With the global-data-manager, you can create, modify, or delete project-global variables in any file without the hassel of exporting and importing variables from multiple files.

### Accessing variables
all - Retrieves all the store properties and values

fetch - Retrieves the key-value pair

put - Stores the key-value pair, over-writes the key if it already exists

create - Creates the key-value pair, will not over-write the key if it already exists

erase - Removes the property from the global store

copy - Copy the value from one property to another

rename - Rename a property without changing the value

#### Usage Example
```
const Manager = require('global-silo-manager')

const store1 = new Manager(1)
const store2 = new Manager(2)

store1.put('id', 1)
store2.put('id', 2)

store1.all() // returns { id: 1 }
store2.all() // returns { id: 2 }
```

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