Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dexie

Package Overview
Dependencies
Maintainers
2
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dexie - npm Package Compare versions

Comparing version 3.2.1-beta.1 to 3.2.1-beta.2

import-wrapper-prod.mjs

2

dist/dexie.d.ts

@@ -7,3 +7,3 @@ /*

*
* Version 3.2.1-beta.1, Fri Nov 19 2021
* Version 3.2.1-beta.2, Wed Jan 05 2022
*

@@ -10,0 +10,0 @@ * https://dexie.org

{
"name": "dexie",
"version": "3.2.1-beta.1",
"version": "3.2.1-beta.2",
"description": "A Minimalistic Wrapper for IndexedDB",

@@ -8,3 +8,28 @@ "main": "dist/dexie.js",

"jsnext:main": "dist/dexie.mjs",
"exports": "./dist/modern/dexie.mjs",
"exports": {
".": {
"production": {
"browser": "./dist/modern/dexie.min.mjs",
"module": "./dist/modern/dexie.min.mjs",
"import": "./import-wrapper-prod.mjs",
"require": "./dist/dexie.min.js",
"default": "./dist/dexie.min.js"
},
"development": {
"browser": "./dist/modern/dexie.mjs",
"module": "./dist/modern/dexie.mjs",
"import": "./import-wrapper.mjs",
"require": "./dist/dexie.js",
"default": "./dist/dexie.js"
},
"default": {
"browser": "./dist/modern/dexie.mjs",
"module": "./dist/modern/dexie.mjs",
"import": "./import-wrapper.mjs",
"require": "./dist/dexie.js",
"default": "./dist/dexie.js"
}
},
"./package.json": "./package.json"
},
"typings": "dist/dexie.d.ts",

@@ -11,0 +36,0 @@ "jspm": {

@@ -47,4 +47,35 @@ Dexie.js

```
Yes, it's that simple.
Yes, it's that simple.
An equivalent modern version (works in all modern browsers):
```html
<!doctype html>
<html>
<head>
<script type="module">
import Dexie from "https://unpkg.com/dexie@latest/dist/modern/dexie.mjs";
//
// Declare Database
//
const db = new Dexie("FriendDatabase");
db.version(1).stores({
friends: "++id,name,age"
});
//
// Manipulate and Query Database
//
try {
await db.friends.add({name: "Josephine", age: 21});
const youngFriends = await db.friends.where("age").below(25).toArray();
alert (`My young friends: ${JSON.stringify(youngFriends)}`);
} catch (e) {
alert (`Error: ${e}`);
}
</script>
</head>
</html>
```
[Tutorial](https://dexie.org/docs/Tutorial)

@@ -114,36 +145,6 @@

#### Hello World (ES2016 / ES7)
```js
import Dexie from 'dexie';
//
// Declare Database
//
const db = new Dexie("FriendDatabase");
db.version(1).stores({ friends: "++id,name,age" });
db.transaction('rw', db.friends, async() => {
// Make sure we have something in DB:
if ((await db.friends.where({name: 'Josephine'}).count()) === 0) {
const id = await db.friends.add({name: "Josephine", age: 21});
alert (`Addded friend with id ${id}`);
}
// Query:
const youngFriends = await db.friends.where("age").below(25).toArray();
// Show result:
alert ("My young friends: " + JSON.stringify(youngFriends));
}).catch(e => {
alert(e.stack || e);
});
```
#### Hello World (Typescript)
```js
import Dexie from 'dexie';
import Dexie, { Table } from 'dexie';

@@ -160,3 +161,3 @@ interface Friend {

class FriendDatabase extends Dexie {
public friends: Dexie.Table<Friend, number>; // id is number in this case
public friends!: Table<Friend, number>; // id is number in this case

@@ -168,3 +169,2 @@ public constructor() {

});
this.friends = this.table("friends");
}

@@ -219,9 +219,17 @@ }

https://unpkg.com/dexie@latest/dist/dexie.js
### Legacy:
https://unpkg.com/dexie@latest/dist/dexie.min.js
https://unpkg.com/dexie@latest/dist/dexie.js.map
https://unpkg.com/dexie@latest/dist/dexie.min.js.map
### Modern:
https://unpkg.com/dexie@latest/dist/modern/dexie.min.mjs
https://unpkg.com/dexie@latest/dist/modern/dexie.min.mjs.map
### Typings:
https://unpkg.com/dexie@latest/dist/dexie.d.ts
Contributing

@@ -228,0 +236,0 @@ ============

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc