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
🐫.
Publish to npm.org
with yarn release
.