Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/erasys/static-store

Loads data from files as data store
https://github.com/erasys/static-store

Last synced: about 11 hours ago
JSON representation

Loads data from files as data store

Awesome Lists containing this project

README

        

# static-store

This package can be used to load values from YAML files under a `$PWD/static-store` directory.

Example use:

In `static-store/ice-cream-flavor`:

```yaml
1: SchwarzwΓ€lder Kirschwasser πŸ’
2: Millennial-Avocado πŸ₯‘
3: Octopus πŸ™
```

In `my-file.js`:

```js
require('static-store').iceCreamFlavor[3] // returns "Octopus πŸ™"
```

Notes:

- File contents are cached.
- File names are in `kebab-case` πŸ₯™ but in-code proxies are written in `camelCase` 🐫.

## Contributing

Publish to `npm.org` with `yarn release`.