create-cached-fn
v0.0.8
Published
Utility to run promise in daemon mode and save cache in file.
Downloads
38
Readme
create-cached-fn
Utility to run promise in daemon mode and save cache in file.
To install package:
npm install create-cached-fn
Usage
import createCachedFn from 'create-cached-fn';
createCachedFn(
async () => [1, 2, 3],
'./test.json'
true,
)
Docs
promiseFunc
- function to executecachePath
- path to save resultalwaysRunPromise?
- run the promise at startup or skip waiting
Deploy
To install dependencies:
npm install
To build:
npm build
This project was created using bun init
in bun v1.1.0. Bun is a fast all-in-one JavaScript runtime.