@1ib/cache
v0.0.1
Published
A TypeScript utility for caching results of method executions.
Downloads
5
Readme
cache
A TypeScript utility for caching results of method executions.
class {
@cache()
async foo() {
// ...
}
}Install
Node.js
Install using npm or other package managers:
npm install 1ib/cacheImport into your Node.js project:
// CommonJS
const { cache } = require("1ib/cache")
// ESM
import { cache } from "1ib/cache"Deno
Install using JSR:
deno add 1ib/cache
#or
jsr add 1ib/cacheThen import into your Deno project:
import { cache } from "1ib/cache"Bun
Install using this command:
bun add 1ib/cacheImport into your Bun project:
import { cache } from "1ib/cache"Browser
It's recommended to import the minified version to save bandwidth:
import { cache } from "https://cdn.skypack.dev/1ib/cache?min"However, you can also import the unminified version for debugging purposes:
import { cache } from "https://cdn.skypack.dev/1ib/cache"License
This project is licensed under the MIT.
