Socket
Socket
Sign inDemoInstall

lowdb

Package Overview
Dependencies
6
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.12.4 to 0.12.5

9

index.js

@@ -114,3 +114,6 @@ 'use strict';

function db(key) {
var array = db.object[key] = db.object[key] || [];
if (typeof db.object[key] === 'undefined') {
db.object[key] = [];
}
var array = db.object[key];
var short = lowChain(_, array, _save);

@@ -120,2 +123,6 @@ short.chain = function () {

};
// Prevents db.write being called when just calling db('foo').value()
short.value = function () {
return db.object[key];
};
return short;

@@ -122,0 +129,0 @@ }

2

package.json
{
"name": "lowdb",
"version": "0.12.4",
"version": "0.12.5",
"description": "JSON database for Node and the browser powered by lodash",

@@ -5,0 +5,0 @@ "keywords": [

@@ -10,2 +10,3 @@ # lowdb [![NPM version](https://badge.fury.io/js/lowdb.svg)](http://badge.fury.io/js/lowdb) [![Build Status](https://travis-ci.org/typicode/lowdb.svg?branch=master)](https://travis-ci.org/typicode/lowdb)

const storage = require('lowdb/file-sync')
const db = low('db.json', { storage })

@@ -16,3 +17,3 @@

Database is __automatically__ saved to `db.json`
Database is __automatically__ saved to `db.json`.

@@ -33,2 +34,8 @@ ```js

And access underlying database object any time.
```js
db.object.posts
```
__[Click here to try lowdb in the browser.](http://typicode.github.io/lowdb/)__

@@ -35,0 +42,0 @@

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

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc