Function updateTreeInTags

  • Takes an array of tags and updates all the "x" tags to reflect the current tree

    Parameters

    • tags: string[][]
    • root: TreeFolder
    • keepEmpty: boolean = true

    Returns string[][]

    Example

    const tags = event.tags
    const newTags = updateTreeInTags(tags, tree)
    const newEvent = {
    kind: event.kind,
    content: event.content,
    created_at: Math.floor(Date.now()/1000),
    tags: newTags
    }

    publish(await signer(newEvent))

Generated using TypeDoc