Skip to content

Commit

Permalink
docs: rename import variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Jan 10, 2024
1 parent 7b9975b commit b275890
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ If adding many multiple items to the pail together, it is faster to batch them t
import { put, get, del } from '@alanshaw/pail'
import { ShardBlock } from '@alanshaw/pail/shard'
import { MemoryBlockstore } from '@alanshaw/pail/block'
import * as Batcher from '@alanshaw/pail/batch'
import * as Batch from '@alanshaw/pail/batch'

// Initialize a new bucket
const blocks = new MemoryBlockstore()
const init = await ShardBlock.create() // empty root shard
await blocks.put(init.cid, init.bytes)

const batch = await Batcher.create(blocks, init.cid)
const batch = await Batch.create(blocks, init.cid)

// items is an array of `{ key: string, value: CID }` - the items to add to the pail
for (const item of items) {
Expand Down

0 comments on commit b275890

Please sign in to comment.