Socket
Socket
Sign inDemoInstall

lowdb

Package Overview
Dependencies
7
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.5 to 0.12.0

2

index.js

@@ -19,3 +19,3 @@ 'use strict';

_.functions(chain).forEach(function (method) {
_.functionsIn(chain).forEach(function (method) {
chain[method] = _.flow(chain[method], function (arg) {

@@ -22,0 +22,0 @@ var v = arg.value ? arg.value() : arg;

{
"name": "lowdb",
"version": "0.11.5",
"version": "0.12.0",
"description": "JSON database for Node and the browser powered by lodash",

@@ -21,3 +21,3 @@ "keywords": [

"scripts": {
"test": "babel-node test/all && standard",
"test": "babel-node test/all | tap-spec",
"prepublish": "npm run build",

@@ -41,3 +41,3 @@ "precommit": "npm test",

"json-parse-helpfulerror": "^1.0.3",
"lodash": "^3.1.0",
"lodash": "^4.0.0",
"steno": "^0.4.1"

@@ -53,2 +53,3 @@ },

"standard": "^4.0.1",
"tap-spec": "^4.1.1",
"tape": "^4.2.2",

@@ -55,0 +56,0 @@ "tempfile": "^1.1.1",

@@ -192,4 +192,4 @@ # 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 song1 = db('songs').first()
const song2 = db('songs').second()
const post1 = db('posts').first()
const post2 = db('posts').second()
```

@@ -202,3 +202,3 @@

```js
db.object // { songs: [ ... ] }
db.object // { posts: [ ... ] }
```

@@ -210,3 +210,3 @@

// Delete an array
delete db.object.songs
delete db.object.posts
db.write()

@@ -253,8 +253,8 @@

Sort the top five songs.
Sort the top five posts.
```js
db('songs')
db('posts')
.chain()
.where({published: true})
.filter({published: true})
.sortBy('views')

@@ -265,24 +265,24 @@ .take(5)

Retrieve song titles.
Retrieve post titles.
```js
db('songs').pluck('title')
db('posts').map('title')
```
Get the number of songs.
Get the number of posts.
```js
db('songs').size()
db('posts').size()
```
Make a deep clone of songs.
Make a deep clone of posts.
```js
db('songs').cloneDeep()
db('posts').cloneDeep()
```
Update a song.
Update a post.
```js
db('songs')
db('posts')
.chain()

@@ -294,6 +294,6 @@ .find({ title: 'low!' })

Remove songs.
Remove posts.
```js
db('songs').remove({ title: 'low!' })
db('posts').remove({ title: 'low!' })
```

@@ -312,4 +312,4 @@

const songId = db('songs').insert({ title: 'low!' }).id
const song = db('songs').getById(songId)
const postId = db('posts').insert({ title: 'low!' }).id
const post = db('posts').getById(postId)
```

@@ -322,4 +322,4 @@

const songId = db('songs').push({ id: uuid(), title: 'low!' }).id
const song = db('songs').find({ id: songId })
const postId = db('posts').push({ id: uuid(), title: 'low!' }).id
const post = db('posts').find({ id: postId })
```

@@ -326,0 +326,0 @@

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