Skip to content

erasys/static-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 in camelCase 🐫.

Contributing

Publish to npm.org with yarn release.

About

Loads data from files as data store

Resources

License

Stars

Watchers

Forks

Packages

No packages published