Dubnium
v3
v3
  • Overview
  • API
    • Initialize
    • Manage
    • Get
    • Edit
    • Search
    • Miscellaneous
    • Middleware
    • Versioning
  • TEMPLATES
    • JSON
    • String
  • EXTENSIONS
    • Setup
    • Create
    • Find
  • OTHER
  • CLI
  • Events
  • Update Log
  • EXTERNAL LINKS
    • Need more help?
    • Report an Issue
Powered by GitBook
On this page

Was this helpful?

Events

Dubnium uses the built-in Events module to send messages when something happens!

Event
Callback Arguments
About

start

Directory path & file extension

Fires when Dubnium is initialized.

create

Tag & content

Fires when a Record is created.

delete

Tag & content

Fires when a Record is deleted.

edit

Tag, old & new content

Fires when a Record's value changes.

retagged

Old & new tag

Fires when a Record's tag changes.

wipe

Directory path

Fires when the database is wiped.

close

Directory path

Fires when the database is closed.

delete_old

Options

Fires when deleteOld is called. (Will also fire delete for any Records deleted)

dir

Directroy path

Fires when the directory is created.

move

Tag, old & new directory

Fires when a Record is moved.

clone

Tag, target

Fires when a Record is cloned.

symlink

Tag & path to symlink

Fires when a Symlink is created.

sync

Tag & tag of synced with

Fires when syncWith is called.

delete_large

Options

append

Tag, content

Fires when content is appended.

truncate

Tag, length

Fires when a Record is truncated.

fs

Function, tag, args

beautify

Tag, replacer, space

Fires when JSON is beautified.

exec

Command & callback

save

Tag & content

Fires when a record is saved. This will also fire the edit event.

stop_versioning

Options

Fires when you stop recording versions.

empty

Record tag

Fires when a Record is emptied.

Example

db.on('create', (tag, content) => { console.log(`${tag} was created!`) })
PreviousCLINextUpdate Log

Last updated 1 year ago

Was this helpful?

Fires when is called.

Fires when is called.

Fires when a bash command is ran via .

Any events from fs.watch() will be fired if is enabled.

versioning
deleteLarge()
fs()
db.exec()