@erasys/static-store
v0.1.0
Published
Loads data from files as a data store
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:
1: Schwarzwälder Kirschwasser 🍒
2: Millennial-Avocado 🥑
3: Octopus 🐙In my-file.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 incamelCase🐫.
Contributing
Publish to npm.org with yarn release.
