🎲
Simpl.DB
GitHubDonate
v2.11.0
v2.11.0
  • Introduction
  • Changelog
  • Getting Started
  • Troubleshooting
  • Documentation
    • Database
      • .add()
      • .clear()
      • .createCollection()
      • .delete()
      • .deleteCollection()
      • .fetch()
      • .get()
      • .getCollection()
      • .has()
      • .pull()
      • .push()
      • .rename()
      • .save()
      • .set()
      • .subtract()
      • .toJSON()
      • .update()
    • Collection
      • .create()
      • .createBulk()
      • .fetch()
      • .fetchOrCreate()
      • .get()
      • .getOrCreate()
      • .has()
      • .random()
      • .remove()
      • .reset()
      • .save()
      • .update()
  • Types/Interfaces
    • Data
    • JSONData
    • Modifiable<T>
Powered by GitBook
On this page

Was this helpful?

  1. Documentation
  2. Database

.clear()

Clears the database.

clear()

db.toJSON(); // { users: [{ name: 'Peter' }, { name: 'Michael' }] }

db.clear();

db.toJSON(); // {}
Previous.add()Next.createCollection()

Last updated 3 years ago

Was this helpful?