create-cached-fn
v0.0.8
Published
Utility to run promise in daemon mode and save cache in file.
Readme
create-cached-fn
Utility to run promise in daemon mode and save cache in file.
To install package:
npm install create-cached-fnUsage
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 installTo build:
npm buildThis project was created using bun init in bun v1.1.0. Bun is a fast all-in-one JavaScript runtime.
