repo_description: Simple and fast JSON database
repo_topics: database electron embeddable embedded-database javascript json localstorage lodash nodejs storage
code: import { JSONFileSyncPreset } from '../presets/node.js'
  
  type Data = {
    messages: string[]
  }
  
  const message = process.argv[2] || ''
  
  const defaultData: Data = { messages: [] }
  const db = JSONFileSyncPreset<Data>('file.json', defaultData)
  
  db.update(({ messages }) => messages.push(message))
  