Skip to content

Commit

Permalink
Added documentation on reindexing behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom committed Jul 1, 2021
1 parent 7a5b6ae commit 6db1f66
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@ db.get("key").delete();
// after: {'key2': 'value2'}
```

If you delete a value from a list, it will leave a null value in the place of the deleted data:

```js
db.get("key").get(1).delete();
// before: {'key': [1, 2, 3]}
// after: {'key2': [1, null, 3]}
```

If you don't want this behaviour, you can pass in `true` to the `.delete()` function to not leave a null value in place of the deleted data:

```js
db.get("key").get(1).delete(true);
// before: {'key': [1, 2, 3]}
// after: {'key2': [1, 3]}
```

Set Key-Value Pair on Dictionary with Shorthand Syntax:

```js
Expand Down

0 comments on commit 6db1f66

Please sign in to comment.