Skip to content

Commit 2ad8ad4

Browse files
authored
Merge pull request #1 from pacifiquem/pac-main
feat: added delAll api .
2 parents 2fdf1ac + abe6eee commit 2ad8ad4

File tree

7 files changed

+2676
-6
lines changed

7 files changed

+2676
-6
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ I actively welcome your pull requests:
1818
6. Issue that pull request!
1919

2020

21-
#### Report bugs using Github's [issues](https://github.com/briandk/transcriptase-atom/issues)
21+
#### Report bugs using Github's [issues](https://github.com/ndzhwr/json-base/issues/new)
2222

2323
I use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/ndzhwr/json-base/issues/new); it's that easy!
2424

2525
#### Write bug reports with detail, background, and sample code
2626

2727
- A quick summary and/or background
2828
- Steps to reproduce
29-
- Be specific!
30-
- Give sample code if you can.
29+
- Be specific!
30+
- Give sample code if you can.
3131
- What you expected would happen
3232
- What actually happens
3333
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

LICENCE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Régis NDIZIHIWE
3+
Copyright (c) 2023 - Present Régis NDIZIHIWE
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Let's have a simple tutorial on how we can use this `json-base`. We're going to
5050
2. Deleting data with del() api
5151
3. Updating data with set() api
5252
4. Adding data with add() api
53+
5. Deleting All data with delAll() api
5354

5455
#### 0. Setting up jsondb in a project
5556
Before starting to perform transactions to the database, let's
@@ -158,6 +159,19 @@ Enough for updating data, the next is to learn how to delete some records from t
158159
}())
159160
```
160161

162+
163+
We can't finish without talking about how to delete all data from db in case you want . here are code example
164+
165+
```ts
166+
import { delAll } from '@ndzhwr/json-base'
167+
168+
(async function(){
169+
await delAll();
170+
}())
171+
172+
```
173+
174+
161175
🎉 Congrats! Now we've finished creating our CRUD operations on the models and I hope now you're able to consume the API and make your life easier.
162176
*For more, jsdoc was used , hover on your imported function to see the documentation*
163177

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export * from './scripts/get.js'
88
export * from './scripts/set.js'
99
export * from './scripts/del.js'
1010
export * from './scripts/add.js'
11-
11+
export * from './scripts/delAll'

0 commit comments

Comments
 (0)