# glob-store

> Key-value store with iterator and glob semantics

Latest version **1.0.0** (published 2014-09-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install glob-store
pnpm add glob-store
yarn add glob-store
bun add glob-store
```

## 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 | 1.0.0 |
| Published | 2014-09-20 |
| First published | 2014-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Maximilian Antoni |
| Maintainers | mantoni |
| Keywords | store, glob, key-value |

## Links

- npm: https://www.npmjs.com/package/glob-store
- Repository: https://github.com/mantoni/glob-store.js
- Issues: https://github.com/mantoni/glob-store.js/issues
- npm.io page: https://npm.io/package/glob-store

## Dependencies (4)

- [inherits](https://npm.io/package/inherits.md) ^2.0
- [glob-tree](https://npm.io/package/glob-tree.md) ^1.0
- [live-list](https://npm.io/package/live-list.md) ^1.0
- [min-iterator](https://npm.io/package/min-iterator.md) ^1.0

## Recent versions

- 1.0.0 (latest) — 2014-09-20
- 0.2.0 — 2014-04-01
- 0.1.0 — 2014-02-12

## README

# glob-store.js

[![Build Status]](https://travis-ci.org/mantoni/glob-store.js)
[![SemVer]](http://semver.org)
[![License]](https://github.com/mantoni/glob-store.js/blob/master/LICENSE)

Key-value store with iterator and glob semantics. Allows to store multiple
values per key and can be modified during iteration.

## Install with npm

```
npm install glob-store
```

## Browser compatibility

To use this module in a browser, download the npm package and then use
[Browserify](http://browserify.org) to create a standalone version.

## Usage

```js
var Store = require('glob-store').Store;

var s = new Store();
s.add('**', 1);
s.add('a.b', 2);
s.add('a.c', 3);
s.add('a.c', 7);

var c, i = s.iterator('a.*');
while ((c = i.next()) !== undefined) {
  console.log(i.name + ': ' + c);
}
```

The implementation is based on [glob-tree][], but allows multiple values to be
stored under the same key.

## Store API

- `add(name, value)`
- `remove(name, value)`
- `removeAll([name])`
- `iterator(name[, options])`
- `values([name])`

The iterator is derived from [min-iterator][] and supports the same `options`
as the [glob-tree][] iterator:

- `matchers`: whether to include matchers, defaults to `true`
- `onlyMatchers`: whether to only include matchers, defaults to `false`

## License

MIT

[Build Status]: http://img.shields.io/travis/mantoni/glob-store.js.svg
[SemVer]: http://img.shields.io/:semver-%E2%9C%93-brightgreen.svg
[License]: http://img.shields.io/npm/l/glob-store.svg
[min-iterator]: https://github.com/mantoni/min-iterator.js
[glob-tree]: https://github.com/mantoni/glob-tree.js

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