How to use the nomnoml.file_index function in nomnoml

To help you get started, we’ve selected a few nomnoml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github skanaar / nomnoml / webapp / StoreLocal.ts View on Github external
async files(): Promise {
    return JSON.parse(localStorage['nomnoml.file_index'] || '[]') as FileEntry[]
  }
  async read(name: string): Promise {
github skanaar / nomnoml / webapp / StoreLocal.ts View on Github external
async insert(name: string, source: string): Promise {
    var entry: FileEntry = {
      date: (new Date()).toISOString(),
      collaborators: [],
      name: name,
      revision: 0,
    }
    var index = await this.files()
    if (!nomnoml.skanaar.find(index, e => e.name === name)) {
      index.push(entry)
      index.sort((a,b) => a.name.localeCompare(b.name))
      localStorage['nomnoml.file_index'] = JSON.stringify(index)
    }
    localStorage[this.prefix+name] = source
  }
  async save(name: string, source: string): Promise {
github skanaar / nomnoml / webapp / StoreUrl.ts View on Github external
async files(): Promise {
    return JSON.parse(localStorage['nomnoml.file_index'] || '[]') as FileEntry[]
  }
  async read(name: string): Promise { return this.source }
github skanaar / nomnoml / webapp / FileSystem.ts View on Github external
files(): FileEntry[] {
    return JSON.parse(localStorage['nomnoml.file_index'] || '[]') as FileEntry[]
  }
  setFiles(index: FileEntry[]): void {
github skanaar / nomnoml / webapp / StoreDefaultBuffer.ts View on Github external
async files(): Promise {
    return JSON.parse(localStorage['nomnoml.file_index'] || '[]') as FileEntry[]
  }
  async read(name: string): Promise { return localStorage[this.storageKey] }

nomnoml

The sassy UML renderer that generates diagrams from text

MIT
Latest version published 8 days ago

Package Health Score

73 / 100
Full package analysis