mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
expose wrapper and use default import
This commit is contained in:
parent
6faa81034c
commit
50d542b719
4 changed files with 6 additions and 6 deletions
|
@ -23,7 +23,7 @@ npm install @tursodatabase/turso
|
|||
### In-Memory Database
|
||||
|
||||
```javascript
|
||||
import { Database } from '@tursodatabase/turso';
|
||||
import Database from '@tursodatabase/turso';
|
||||
|
||||
// Create an in-memory database
|
||||
const db = new Database(':memory:');
|
||||
|
@ -48,7 +48,7 @@ console.log(users);
|
|||
### File-Based Database
|
||||
|
||||
```javascript
|
||||
import { Database } from '@tursodatabase/turso';
|
||||
import Database from '@tursodatabase/turso';
|
||||
|
||||
// Create or open a database file
|
||||
const db = new Database('my-database.db');
|
||||
|
|
|
@ -3,7 +3,7 @@ import fs from "node:fs";
|
|||
import { fileURLToPath } from "url";
|
||||
import path from "node:path";
|
||||
|
||||
import { Database } from "../wrapper.js";
|
||||
import Database from "../wrapper.js";
|
||||
|
||||
test("Open in-memory database", async (t) => {
|
||||
const [db] = await connect(":memory:");
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"url": "https://github.com/tursodatabase/turso"
|
||||
},
|
||||
"description": "The Turso database library",
|
||||
"main": "index.js",
|
||||
"main": "wrapper.js",
|
||||
"types": "index.d.ts",
|
||||
"napi": {
|
||||
"name": "turso",
|
||||
|
@ -42,4 +42,4 @@
|
|||
"version": "napi version"
|
||||
},
|
||||
"packageManager": "yarn@4.6.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -268,4 +268,4 @@ class Statement {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports.Database = Database;
|
||||
module.exports = Database;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue