idb-ts 3.0.0 β†’ 3.0.1

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.
Files changed (2) hide show
  1. package/README.md +36 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,15 +1,28 @@
1
- # idb-ts
1
+ # πŸš€ idb-ts
2
2
 
3
- ## Installation
4
- ```
3
+ ## πŸ“Œ Introduction
4
+ **idb-ts** is a lightweight, declarative, and type-safe way to work with IndexedDB using TypeScript. Effortlessly perform CRUD operations on your database with clean, structured code! πŸ”₯
5
+
6
+ ## πŸ“¦ Installation
7
+ Install via npm and start using IndexedDB like a pro! ⚑
8
+ ```sh
5
9
  npm i idb-ts
6
10
  ```
7
11
 
8
- ## Example
12
+ ## ✨ Features
13
+ - βœ… **Declarative & Type-Safe** - Define your data models with decorators.
14
+ - ⚑ **Easy CRUD Operations** - Perform create, read, update, and delete seamlessly.
15
+ - πŸš€ **Fully Typed API** - Benefit from TypeScript’s powerful type system.
16
+ - 🏎️ **Performance Optimized** - Minimal overhead with IndexedDB's native capabilities.
9
17
 
10
- ### Declaring entity
11
- ```
18
+ ---
19
+
20
+ ## πŸ“– Example Usage
21
+
22
+ ### πŸ—οΈ Declaring Entities
23
+ Use decorators to define your data models with automatic schema management.
12
24
 
25
+ ```typescript
13
26
  @DataClass()
14
27
  class User {
15
28
  @KeyPath()
@@ -41,8 +54,10 @@ class Location {
41
54
  }
42
55
  ```
43
56
 
44
- ### CRUD on DB
45
- ```
57
+ ### πŸ”„ CRUD Operations
58
+ Perform database operations in an intuitive way:
59
+
60
+ ```typescript
46
61
  const db = await Database.build("idb-crud", [User, Location]);
47
62
 
48
63
  const alice = new User("Alice", 25, "123 Main St");
@@ -52,25 +67,30 @@ await db.create(User, alice);
52
67
  await db.create(Location, nyc);
53
68
 
54
69
  const readAlice = await db.read(User, "Alice");
55
- console.log("Read user:", readAlice);
70
+ console.log("πŸ‘€ Read user:", readAlice);
56
71
 
57
72
  alice.age = 26;
58
73
  alice.address = "789 Maple St";
59
74
  await db.update(User, alice);
60
75
 
61
76
  const users = await db.list(User);
62
- console.log("All users:", users);
77
+ console.log("πŸ“‹ All users:", users);
63
78
 
64
79
  await db.delete(User, "Alice");
65
- console.log("User Alice deleted.");
80
+ console.log("❌ User Alice deleted.");
66
81
 
67
82
  const remainingUsers = await db.list(User);
68
- console.log("Remaining users:", remainingUsers);
83
+ console.log("πŸ” Remaining users:", remainingUsers);
69
84
 
70
85
  const locations = await db.list(Location);
71
- console.log("All locations:", locations);
86
+ console.log("🌍 All locations:", locations);
72
87
  ```
73
88
 
74
- ## Links
75
- - GitHub: https://github.com/maifeeulasad/idb-ts
76
- - NPM: https://www.npmjs.com/package/idb-ts
89
+ ---
90
+
91
+ ## πŸ”— Useful Links
92
+ - πŸ“‚ **GitHub**: [maifeeulasad/idb-ts](https://github.com/maifeeulasad/idb-ts)
93
+ - πŸ“¦ **NPM**: [idb-ts](https://www.npmjs.com/package/idb-ts)
94
+
95
+ πŸŽ‰ **Enjoy seamless IndexedDB integration with TypeScript! Happy coding!** πŸš€
96
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idb-ts",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Easy CRUD for indexed-db, written in TypeScript",
5
5
  "main": "index.ts",
6
6
  "scripts": {