-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpull request welcomeA pull request is welcomeA pull request is welcome
Description
The events propagated on sub-level instances do not have their value encoded, unlike events triggered by sublevel pushes.
Is this correct behavior?
const db = new Level('db')
await db.open()
db.on('put', (key, value) => {
// { key: 'hello', value: { world: 'foo' } }
// { key: '!sub!hello', value: '[object Object]' }
console.log({ key, value })
})
const sub = db.sublevel('sub')
await db.put('hello', { world: 'foo' })
console.log(await db.get('hello'))
await sub.put('hello', { world: 'foo' })
console.log(await sub.get('hello'))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpull request welcomeA pull request is welcomeA pull request is welcome
Type
Projects
Status
Backlog