Skip to content

Commit

Permalink
docs: improve examples (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel authored Aug 26, 2024
1 parent a5985fc commit db8c90a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ const { createLRU } = require('lru.min');
```ts
import { createLRU } from 'lru.min';

const LRU = createLRU({ max: 150000 });
const LRU = createLRU({ max: 150_000 });
```

Also, you can set a callback for every deletion/eviction:

```ts
const LRU = createLRU({
max: 1000,
max: 150_000,
onEviction: (key, value) => {
// do something
},
Expand Down Expand Up @@ -133,7 +133,7 @@ LRU.evict(1000);
Resizes the cache to a new maximum size, evicting items if necessary.

```ts
LRU.resize(50000);
LRU.resize(50_000);
```

### Clear the cache
Expand Down

0 comments on commit db8c90a

Please sign in to comment.