Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
inventionpro authored Apr 5, 2024
1 parent 49ef5e1 commit 20da1a0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ DB.set('key', 'value')
- `has(key)` - Checks for a key in the db return true or false
- `remove(key)` - Removes a key from the db
- `find(function)` - Returns a list of keys which values follow the function
- `keys()` - List of all the keys on the db
- `all()` - Gets the whole database as object
- `backup(file)` - Backups the db file to another file (big dbs will take some time)

Expand All @@ -32,3 +33,11 @@ Functions for values that are of type array
- `pop(key)` - Removes last element (return removed value)
- `flat(key)` - Flattens array at key
- `concat(key, value)` - Concats a array to the current one

### Object values
Functions for values that are of type object/json
You can add `.` inside the keys to denote access of a further object
Example of `.`: `key.key2` for { key: { key2: 'Hello', key1: 'Bye' } } is 'Hello'
- `oset(key, value)` - Set a value inside a object
- `oget(key)` - Get a value inside a object in a key
- `okey(key)` - The keys of a object on a key

0 comments on commit 20da1a0

Please sign in to comment.