fast-cache
Caches a method that returns a promise and does so really fast.
Installation
Download node at nodejs.org and install it, if you haven't already.
npm install fast-cache --save
Usage
/* eslint-disable */ ;; // this will only be called once since it'll get cachedconst fn = { // fetch is just an example, could be something so simple as Promise.resolve(...) return ;};const cached = ; ; ; const keyBased = ; ; ;
Tests
npm installnpm test
Dependencies
None
Dev Dependencies
- async-cache-promise: async-cache - but with promises
- babel-cli: Babel command line.
- babel-core: Babel compiler core.
- babel-plugin-syntax-async-functions: Allow parsing of async functions
- babel-plugin-transform-async-to-generator: Turn async functions into ES2015 generators
- babel-polyfill: Provides polyfills necessary for a full ES2015+ environment
- babel-preset-es2015: Babel preset for all es2015 plugins.
- babel-tape-runner: Babel + Tape for running your ES Next tests
- miclint: mic lint cli
- package-json-to-readme: Generate a README.md from package.json contents
- tapava: the syntax of ava, run through tape
License
MIT
Generated by package-json-to-readme