idb-ts 2.0.0 → 3.0.0

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 (3) hide show
  1. package/README.md +1 -1
  2. package/index.ts +1 -1
  3. package/package.json +7 -5
package/README.md CHANGED
@@ -43,7 +43,7 @@ class Location {
43
43
 
44
44
  ### CRUD on DB
45
45
  ```
46
- const db = new Database("idb-crud", [User, Location]);
46
+ const db = await Database.build("idb-crud", [User, Location]);
47
47
 
48
48
  const alice = new User("Alice", 25, "123 Main St");
49
49
  const nyc = new Location("1", "New York", "USA");
package/index.ts CHANGED
@@ -33,7 +33,7 @@ class Database {
33
33
  this.classes = classes;
34
34
  }
35
35
 
36
- static async build(dbName: string, classes: Function[]): Promise<Database> {
36
+ public static async build(dbName: string, classes: Function[]): Promise<Database> {
37
37
  const instance = new Database(dbName, classes);
38
38
  await instance.initDB();
39
39
  return instance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idb-ts",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Easy CRUD for indexed-db, written in TypeScript",
5
5
  "main": "index.ts",
6
6
  "scripts": {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "git+https://github.com/maifeeulasad/idb-crud.git"
12
+ "url": "git+https://github.com/maifeeulasad/idb-ts.git"
13
13
  },
14
14
  "keywords": [
15
15
  "idb",
@@ -19,14 +19,16 @@
19
19
  "author": "Maifee Ul Asad <maifeeulasad@gmail.com>",
20
20
  "license": "MIT",
21
21
  "bugs": {
22
- "url": "https://github.com/maifeeulasad/idb-crud/issues"
22
+ "url": "https://github.com/maifeeulasad/idb-ts/issues"
23
23
  },
24
24
  "files": [
25
25
  "lib"
26
26
  ],
27
- "homepage": "https://github.com/maifeeulasad/idb-crud#readme",
27
+ "homepage": "https://github.com/maifeeulasad/idb-ts#readme",
28
+ "peerDependencies": {
29
+ "reflect-metadata": "^0.2.2"
30
+ },
28
31
  "devDependencies": {
29
- "reflect-metadata": "^0.2.2",
30
32
  "typescript": "^4.6.3"
31
33
  }
32
34
  }