@scarletdb/sdk 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,17 +5,19 @@ Official TypeScript SDK for [Scarlet DB](https://scarletdb.space) - The modern B
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @
|
|
8
|
+
npm install @scarletdb/sdk
|
|
9
9
|
# or
|
|
10
|
-
pnpm add @
|
|
10
|
+
pnpm add @scarletdb/sdk
|
|
11
11
|
# or
|
|
12
|
-
yarn add @
|
|
12
|
+
yarn add @scarletdb/sdk
|
|
13
|
+
# or
|
|
14
|
+
bun add @scarletdb/sdk
|
|
13
15
|
```
|
|
14
16
|
|
|
15
17
|
## Quick Start
|
|
16
18
|
|
|
17
19
|
```typescript
|
|
18
|
-
import { Scarlet } from '@
|
|
20
|
+
import { Scarlet } from '@scarletdb/sdk';
|
|
19
21
|
|
|
20
22
|
// Initialize with your project API key
|
|
21
23
|
const db = new Scarlet({
|
|
@@ -149,7 +151,7 @@ const db = new Scarlet({
|
|
|
149
151
|
## Error Handling
|
|
150
152
|
|
|
151
153
|
```typescript
|
|
152
|
-
import { Scarlet, ScarletError } from '@
|
|
154
|
+
import { Scarlet, ScarletError } from '@scarletdb/sdk';
|
|
153
155
|
|
|
154
156
|
try {
|
|
155
157
|
await db.from('users').insert({ email: 'invalid' });
|