mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 10:21:53 +00:00
return whole doc, better unsubscribe
This commit is contained in:
committed by
Aiden McClelland
parent
6c7e934b50
commit
7fb8e9b6da
@@ -25,6 +25,7 @@ export type Doc = { [key: string]: any }
|
||||
export type Operation = AddOperation<any> | RemoveOperation | ReplaceOperation<any>
|
||||
|
||||
export function getValueByPointer (document: any, pointer: string): any {
|
||||
if (pointer === '/') return document
|
||||
const pathArr = pointer.split('/')
|
||||
pathArr.shift()
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user