Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Commit

Permalink
docs: update readme for v6 (#103)
Browse files Browse the repository at this point in the history
Update README for v6, including updated usage guide and feature list.
  • Loading branch information
boywithkeyboard committed Jul 23, 2022
1 parent 4931608 commit 4413da4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
7 changes: 7 additions & 0 deletions .changeset/thick-news-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"cachu": patch
---

docs: update readme for v6

Update README for v6, including updated usage guide and feature list.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
with:
version: npx changeset version
publish: npx changeset publish
commit: 'ci: version packages'
title: 'ci: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<div align='center'>
<h1>cachu</h1>
</br></br>
</div>

> **Notice**
Need an introduction to v6? [Here](https://gist.github.com/unvented/dab8d3e987cfdd79f68e715d29c1ee17) you go!
# cachu

## Setup

Expand All @@ -18,27 +12,36 @@ npm i cachu@dev

## Usage

### Deno

```typescript
import { useCache } from 'https://deno.land/x/cachu@v6.0.0/mod.ts'

const cache = await useCache()
```
> **Note** - Need an introduction to v6? [Here](https://gist.github.com/unvented/dab8d3e987cfdd79f68e715d29c1ee17) you go!
### Node.js

```js
import { useCache } from 'cachu'

const cache = await useCache()
const cache = useCache()

// Add a new entry.
await cache.add('one', 'Hello World')

const entry = await cache.get('one') // 'Hello World'
```

### Deno

```typescript
import { useCache } from 'https://deno.land/x/cachu@v6.0.0/mod.ts'
```

### Browser

```typescript
import { useCache } from 'cachu/browser'

// Alternatively, you might want to use a CDN.
import { useCache } from 'https://cdn.jsdelivr.net/npm/cachu@6'
```

## API

* #### Configuration
Expand All @@ -48,14 +51,14 @@ const entry = await cache.get('one') // 'Hello World'

* #### Features

* [`add()`](/guide/features/set.md)
* [`addMany()`](/guide/features/setMany.md)
* [`add()`](/guide/features/add.md)
* [`addMany()`](/guide/features/addMany.md)
* [`get()`](/guide/features/get.md)
* [`getMany()`](/guide/features/getMany.md)
* [`update()`](/guide/features/update.md)
* [`updateMany()`](/guide/features/updateMany.md)
* [`remove()`](/guide/features/delete.md)
* [`removeMany()`](/guide/features/deleteMany.md)
* [`remove()`](/guide/features/remove.md)
* [`removeMany()`](/guide/features/removeMany.md)
* [`has()`](/guide/features/has.md)
* [`size()`](/guide/features/size.md)
* [`keys()`](/guide/features/keys.md)
Expand Down

0 comments on commit 4413da4

Please sign in to comment.