Socket
Socket
Sign inDemoInstall

lowdb

Package Overview
Dependencies
1
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.1 to 5.0.0

lib/browser.d.ts

10

package.json
{
"name": "lowdb",
"version": "4.0.1",
"version": "5.0.0",
"description": "Tiny local JSON database for Node, Electron and the browser",

@@ -30,3 +30,7 @@ "keywords": [

"type": "module",
"exports": "./lib/index.js",
"exports": {
".": "./lib/index.js",
"./node.js": "./lib/node.js",
"./browser.js": "./lib/browser.js"
},
"types": "lib",

@@ -42,3 +46,3 @@ "files": [

"prepublishOnly": "npm run build",
"postversion": "git push && git push --tags && npm publish",
"postversion": "git push --follow-tags && npm publish",
"prepare": "husky install"

@@ -45,0 +49,0 @@ },

@@ -70,3 +70,4 @@ # lowdb [![](http://img.shields.io/npm/dm/lowdb.svg?style=flat)](https://www.npmjs.org/package/lowdb) [![Node.js CI](https://github.com/typicode/lowdb/actions/workflows/node.js.yml/badge.svg)](https://github.com/typicode/lowdb/actions/workflows/node.js.yml)

// This will work for a local JSON file, for browser usage see examples/ directory
import { Low, JSONFile } from 'lowdb'
import { Low } from 'lowdb'
import { JSONFile } from 'lowdb/node'

@@ -172,3 +173,4 @@ const __dirname = dirname(fileURLToPath(import.meta.url));

```js
import { Low, JSONFile } from 'lowdb'
import { Low } from 'lowdb'
import { JSONFile } from 'lowdb/node'

@@ -183,3 +185,4 @@ const db = new Low(new JSONFile('file.json'))

```js
import { LowSync, JSONFileSync } from 'lowdb'
import { LowSync } from 'lowdb'
import { JSONFileSync } from 'lowdb/node'

@@ -320,3 +323,4 @@ const db = new LowSync(new JSONFileSync('file.json'))

```js
import { Adapter, Low, TextFile } from 'lowdb'
import { Adapter, Low } from 'lowdb'
import { TextFile } from 'lowdb/node'
import YAML from 'yaml'

@@ -323,0 +327,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc