Skip to content

Commit 7697ae2

Browse files
committed
chore: πŸ“¦ release v1.0.0
1 parent f95d77d commit 7697ae2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ A simple json dbms with an orm, for nodejs, compatible with js and ts.
33
___
44

55
```bash
6-
npm install -g json-base
6+
npm install @ndzhwr/json-base
77
```
88

99
<br></br>
@@ -18,15 +18,15 @@ To get started, first make sure you have the latest stable version of nodejs on
1818

1919
You have to install jsondb with npm, it's not currently available on other package managers like yarn, etc.
2020
```bash
21-
$ npm install -g json-base
21+
$ npm install @ndzhwr/json-base
2222
```
2323

2424
**2. Initialize jsondb in your project**
2525

2626
Initialize jsondb in your project. Open the root folder of your project in your terminal and initialize json-base. This will create a `database.json` file in the project.
2727

2828
```bash
29-
$ json-base --init
29+
$ npx json-base --init
3030
```
3131

3232
**3. Create your base schema or just leave it.**
@@ -53,7 +53,7 @@ Let's have a simple tutorial on how we can use this `json-base`. We're going to
5353
Before starting to perform transactions to the database, let's
5454
learn a little bit on the usage of the CLI
5555
```
56-
Usage : json-base [command]
56+
Usage : npx json-base [command]
5757
Commands :
5858
--init Initialized the database.json in the current directory
5959
--version Prints the current version of json-base
@@ -92,7 +92,7 @@ You will need to remove the models in the json database as long as the sample on
9292
#### 2. Getting data
9393
In this section, we're going to see how we can get data from our json database.
9494
```ts
95-
import { get } from 'json-base'
95+
import { get } from '@ndzhwr/json-base'
9696
(async function(){
9797
const aUsersWithId2 = await get({
9898
collection : "users",
@@ -108,7 +108,7 @@ The code above retreives `1 record` from the `users` collection, where `user.id
108108
#### 3. Create data
109109
As said before, we'll be creating a simple crud operation, this means that we already have read checked on our todo checklist as read is the same as getting data. Next we're going to work on creating data.
110110
```ts
111-
import { add } from 'json-base'
111+
import { add } from '@ndzhwr/json-base'
112112
(async function(){
113113
await add({
114114
collection : "posts",
@@ -129,7 +129,7 @@ Let's combine the update and the delete sections into one section as long as t
129129

130130
Updating data will require a unique identifier of the record we're updating.
131131
```ts
132-
import { set } from 'json-base'
132+
import { set } from '@ndzhwr/json-base'
133133
await set({
134134
collection : "users",
135135
where : {
@@ -144,7 +144,7 @@ Updating data will require a unique identifier of the record we're updating.
144144
Enough for updating data, the next is to learn how to delete some records from the json database. Here, a unique identifier is required.
145145

146146
```ts
147-
import { del } from 'json-base'
147+
import { del } from '@ndzhwr/json-base'
148148

149149
(async function(){
150150
await del({
@@ -156,7 +156,7 @@ Enough for updating data, the next is to learn how to delete some records from t
156156
}())
157157
```
158158

159-
πŸŽ‰ Congrats! Now we've finished creating our CRUD operations on the users model or collection and I hope now you're able to consume our API and make your life easier.
159+
πŸŽ‰ 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.
160160
*For more, jsdoc was used , hover on your imported function to see the documentation*
161161

162162

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "json-base",
2+
"name": "@ndzhwr/json-base",
33
"version": "1.0.0",
44
"main": "dist/index.js",
55
"description": "A simple json dbms with an orm, for nodejs, compatible with js and ts.",

0 commit comments

Comments
Β (0)