Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/erasys/static-store
- Owner: erasys
- License: isc
- Created: 2018-07-30T15:06:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-30T16:58:31.000Z (over 6 years ago)
- Last Synced: 2024-10-02T17:08:50.541Z (about 1 month ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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`.