{"_id":"underscore-db","_rev":"2795222","name":"underscore-db","description":"Use JavaScript objects as databases","dist-tags":{"latest":"0.12.2"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"time":{"modified":"2022-07-11T15:51:25.000Z","created":"2014-09-18T16:24:27.568Z","0.12.2":"2016-12-06T22:40:54.512Z","0.12.1":"2016-11-21T01:12:23.266Z","0.12.0":"2016-10-01T14:58:11.057Z","0.11.0":"2016-08-25T10:41:44.388Z","0.10.0":"2016-03-30T17:30:39.788Z","0.9.1":"2015-10-03T13:49:55.803Z","0.9.0":"2015-06-08T21:42:55.999Z","0.8.1":"2014-11-06T03:54:04.236Z","0.8.0":"2014-09-18T16:24:27.568Z"},"users":{},"author":{"name":"Typicode","email":"typicode@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/typicode/underscore-db.git"},"versions":{"0.12.2":{"name":"underscore-db","version":"0.12.2","description":"Use JavaScript objects as databases","main":"src/node.js","scripts":{"test":"grunt test","build":"grunt","prepush":"npm test","prepublish":"npm run build"},"author":{"name":"Typicode","email":"typicode@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/typicode/underscore-db.git"},"keywords":["JavaScript","Underscore","Lo-Dash","lodash","database","datastore","JSON","object","embed","embeddable"],"devDependencies":{"grunt":"~0.4.2","grunt-browserify":"^3.8.0","grunt-cli":"~0.1.11","grunt-contrib-jshint":"~0.7.2","grunt-contrib-uglify":"^0.9.1","grunt-contrib-watch":"~0.5.3","grunt-mocha-test":"~0.7.0","husky":"^0.11.8","lodash":"^4.6.1","sinon":"~1.8.1","underscore":"^1.8.3"},"gitHead":"b9f139bf37d7b52682db2c0ad5a69e02b569e62a","bugs":{"url":"https://github.com/typicode/underscore-db/issues"},"homepage":"https://github.com/typicode/underscore-db#readme","_id":"underscore-db@0.12.2","_shasum":"d2f85c426ee3f9117d883f8b353b2098141093f3","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.1.0","_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"dist":{"shasum":"d2f85c426ee3f9117d883f8b353b2098141093f3","size":5550,"noattachment":false,"key":"/underscore-db/-/underscore-db-0.12.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore-db/download/underscore-db-0.12.2.tgz"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/underscore-db-0.12.2.tgz_1481064052679_0.4449892642442137"},"directories":{},"publish_time":1481064054512,"_hasShrinkwrap":false,"_cnpm_publish_time":1481064054512,"_cnpmcore_publish_time":"2021-12-16T21:24:01.126Z"},"0.12.1":{"name":"underscore-db","version":"0.12.1","description":"Use JavaScript objects as databases","main":"src/node.js","scripts":{"test":"grunt test","build":"grunt","prepush":"npm test","prepublish":"npm run build"},"author":{"name":"Typicode","email":"typicode@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/typicode/underscore-db.git"},"keywords":["JavaScript","Underscore","Lo-Dash","lodash","database","datastore","JSON","object","embed","embeddable"],"devDependencies":{"grunt":"~0.4.2","grunt-browserify":"^3.8.0","grunt-cli":"~0.1.11","grunt-contrib-jshint":"~0.7.2","grunt-contrib-uglify":"^0.9.1","grunt-contrib-watch":"~0.5.3","grunt-mocha-test":"~0.7.0","husky":"^0.11.8","lodash":"^4.6.1","sinon":"~1.8.1","underscore":"^1.8.3"},"gitHead":"58e6345a59b54cbf15f134ae4fe28567aa2f73ed","bugs":{"url":"https://github.com/typicode/underscore-db/issues"},"homepage":"https://github.com/typicode/underscore-db#readme","_id":"underscore-db@0.12.1","_shasum":"c8321b19da96ca442d5e7232c419b1d8bf063b42","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"dist":{"shasum":"c8321b19da96ca442d5e7232c419b1d8bf063b42","size":5526,"noattachment":false,"key":"/underscore-db/-/underscore-db-0.12.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore-db/download/underscore-db-0.12.1.tgz"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/underscore-db-0.12.1.tgz_1479690742633_0.37560233823023736"},"directories":{},"publish_time":1479690743266,"_hasShrinkwrap":false,"_cnpm_publish_time":1479690743266,"_cnpmcore_publish_time":"2021-12-16T21:24:01.492Z"},"0.12.0":{"name":"underscore-db","version":"0.12.0","description":"Use JavaScript objects as databases","main":"src/node.js","scripts":{"test":"grunt test","build":"grunt","prepush":"npm test","prepublish":"npm run build"},"author":{"name":"Typicode","email":"typicode@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/typicode/underscore-db.git"},"keywords":["JavaScript","Underscore","Lo-Dash","lodash","database","datastore","JSON","object","embed","embeddable"],"devDependencies":{"grunt":"~0.4.2","grunt-browserify":"^3.8.0","grunt-cli":"~0.1.11","grunt-contrib-jshint":"~0.7.2","grunt-contrib-uglify":"^0.9.1","grunt-contrib-watch":"~0.5.3","grunt-mocha-test":"~0.7.0","husky":"^0.11.8","lodash":"^4.6.1","sinon":"~1.8.1","underscore":"^1.8.3"},"gitHead":"7b70b2126de2f360e5d9b7c8cbcd631f9e53c7bb","bugs":{"url":"https://github.com/typicode/underscore-db/issues"},"homepage":"https://github.com/typicode/underscore-db#readme","_id":"underscore-db@0.12.0","_shasum":"36a681b795b2e30c08572cc9c39aed67f1f5ebe7","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"dist":{"shasum":"36a681b795b2e30c08572cc9c39aed67f1f5ebe7","size":5715,"noattachment":false,"key":"/underscore-db/-/underscore-db-0.12.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore-db/download/underscore-db-0.12.0.tgz"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/underscore-db-0.12.0.tgz_1475333889014_0.3011069968342781"},"directories":{},"publish_time":1475333891057,"_hasShrinkwrap":false,"_cnpm_publish_time":1475333891057,"_cnpmcore_publish_time":"2021-12-16T21:24:01.735Z"},"0.11.0":{"name":"underscore-db","version":"0.11.0","description":"Use JavaScript objects as databases","main":"src/node.js","scripts":{"test":"grunt test","prepublish":"grunt"},"author":{"name":"Typicode","email":"typicode@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/typicode/underscore-db.git"},"keywords":["JavaScript","Underscore","Lo-Dash","lodash","database","datastore","JSON","object","embed","embeddable"],"devDependencies":{"grunt":"~0.4.2","grunt-browserify":"^3.8.0","grunt-cli":"~0.1.11","grunt-contrib-jshint":"~0.7.2","grunt-contrib-uglify":"^0.9.1","grunt-contrib-watch":"~0.5.3","grunt-mocha-test":"~0.7.0","lodash":"^4.6.1","sinon":"~1.8.1","underscore":"^1.8.3"},"gitHead":"4195976fe21b17152f77d0ee912146150aa49b75","bugs":{"url":"https://github.com/typicode/underscore-db/issues"},"homepage":"https://github.com/typicode/underscore-db#readme","_id":"underscore-db@0.11.0","_shasum":"8b94856ed1cec8732a6161e9276d39d389d3f9ba","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"dist":{"shasum":"8b94856ed1cec8732a6161e9276d39d389d3f9ba","size":5653,"noattachment":false,"key":"/underscore-db/-/underscore-db-0.11.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore-db/download/underscore-db-0.11.0.tgz"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/underscore-db-0.11.0.tgz_1472121701552_0.4998500579968095"},"directories":{},"publish_time":1472121704388,"_hasShrinkwrap":false,"_cnpm_publish_time":1472121704388,"_cnpmcore_publish_time":"2021-12-16T21:24:01.938Z"},"0.10.0":{"name":"underscore-db","version":"0.10.0","description":"Use JavaScript objects as databases","main":"src/node.js","scripts":{"test":"grunt test","prepublish":"grunt"},"author":{"name":"Typicode","email":"typicode@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/typicode/underscore-db.git"},"keywords":["JavaScript","Underscore","Lo-Dash","lodash","database","datastore","JSON","object","embed","embeddable"],"devDependencies":{"grunt":"~0.4.2","grunt-browserify":"^3.8.0","grunt-cli":"~0.1.11","grunt-contrib-jshint":"~0.7.2","grunt-contrib-uglify":"^0.9.1","grunt-contrib-watch":"~0.5.3","grunt-mocha-test":"~0.7.0","lodash":"^4.6.1","sinon":"~1.8.1","underscore":"^1.8.3"},"gitHead":"fdf0eeda6b6df55f9714999e37cef44878a91868","bugs":{"url":"https://github.com/typicode/underscore-db/issues"},"homepage":"https://github.com/typicode/underscore-db#readme","_id":"underscore-db@0.10.0","_shasum":"a4bd7f5a9c7f2eec31e4784b402241df36671499","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.0","_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"dist":{"shasum":"a4bd7f5a9c7f2eec31e4784b402241df36671499","size":5512,"noattachment":false,"key":"/underscore-db/-/underscore-db-0.10.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore-db/download/underscore-db-0.10.0.tgz"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/underscore-db-0.10.0.tgz_1459359037684_0.8700923048891127"},"directories":{},"publish_time":1459359039788,"_hasShrinkwrap":false,"_cnpm_publish_time":1459359039788,"_cnpmcore_publish_time":"2021-12-16T21:24:02.108Z"},"0.9.1":{"name":"underscore-db","version":"0.9.1","description":"Use JavaScript objects as databases","main":"src/node.js","scripts":{"test":"grunt test","grunt":"grunt"},"author":{"name":"Typicode","email":"typicode@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/typicode/underscore-db.git"},"keywords":["JavaScript","Underscore","Lo-Dash","lodash","database","datastore","JSON","object","embed","embeddable"],"devDependencies":{"grunt":"~0.4.2","grunt-browserify":"^3.8.0","grunt-cli":"~0.1.11","grunt-contrib-jshint":"~0.7.2","grunt-contrib-uglify":"^0.9.1","grunt-contrib-watch":"~0.5.3","grunt-mocha-test":"~0.7.0","lodash":"^3.9.3","sinon":"~1.8.1","underscore":"^1.8.3"},"gitHead":"967acfeaf11e9bff7602ea124605e005776f8159","bugs":{"url":"https://github.com/typicode/underscore-db/issues"},"homepage":"https://github.com/typicode/underscore-db#readme","_id":"underscore-db@0.9.1","_shasum":"c4f9970c72bdf59c6337d1e622b71748edcf3d37","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"dist":{"shasum":"c4f9970c72bdf59c6337d1e622b71748edcf3d37","size":5519,"noattachment":false,"key":"/underscore-db/-/underscore-db-0.9.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore-db/download/underscore-db-0.9.1.tgz"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"directories":{},"publish_time":1443880195803,"_hasShrinkwrap":false,"_cnpm_publish_time":1443880195803,"_cnpmcore_publish_time":"2021-12-16T21:24:02.330Z"},"0.9.0":{"name":"underscore-db","version":"0.9.0","description":"Use JavaScript objects as databases","main":"src/node.js","scripts":{"test":"grunt test","grunt":"grunt"},"author":{"name":"Typicode","email":"typicode@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/typicode/underscore-db.git"},"keywords":["JavaScript","Underscore","Lo-Dash","lodash","database","datastore","JSON","object","embed","embeddable"],"devDependencies":{"grunt":"~0.4.2","grunt-browserify":"^3.8.0","grunt-cli":"~0.1.11","grunt-contrib-jshint":"~0.7.2","grunt-contrib-uglify":"^0.9.1","grunt-contrib-watch":"~0.5.3","grunt-mocha-test":"~0.7.0","lodash":"^3.9.3","sinon":"~1.8.1","underscore":"^1.8.3"},"gitHead":"6df859f43c257eb79a9738e7053327bb3a89d1ae","bugs":{"url":"https://github.com/typicode/underscore-db/issues"},"homepage":"https://github.com/typicode/underscore-db#readme","_id":"underscore-db@0.9.0","_shasum":"77ac6698ab0ef61f7d144ff23121a24ae1c6708b","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"dist":{"shasum":"77ac6698ab0ef61f7d144ff23121a24ae1c6708b","size":5408,"noattachment":false,"key":"/underscore-db/-/underscore-db-0.9.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore-db/download/underscore-db-0.9.0.tgz"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"directories":{},"publish_time":1433799775999,"_hasShrinkwrap":false,"_cnpm_publish_time":1433799775999,"_cnpmcore_publish_time":"2021-12-16T21:24:02.578Z"},"0.8.1":{"name":"underscore-db","version":"0.8.1","description":"Use JavaScript objects as databases","main":"src/node.js","scripts":{"test":"grunt test"},"author":{"name":"Typicode","email":"typicode@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/typicode/underscore-db.git"},"keywords":["JavaScript","Underscore","Lo-Dash","lodash","database","datastore","JSON","object","embed","embeddable"],"devDependencies":{"grunt":"~0.4.2","grunt-browserify":"~1.3.0","grunt-cli":"~0.1.11","grunt-contrib-jshint":"~0.7.2","grunt-contrib-uglify":"~0.2.7","grunt-contrib-watch":"~0.5.3","grunt-mocha-test":"~0.7.0","lodash":"^2.4.1","sinon":"~1.8.1","underscore":"^1.7.0"},"gitHead":"17470fbb4adf4e6c2e338a20077bb9cecc9f2411","bugs":{"url":"https://github.com/typicode/underscore-db/issues"},"homepage":"https://github.com/typicode/underscore-db","_id":"underscore-db@0.8.1","_shasum":"3307952802e0bb32735080a30b5d94b7364330ba","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"dist":{"shasum":"3307952802e0bb32735080a30b5d94b7364330ba","size":5377,"noattachment":false,"key":"/underscore-db/-/underscore-db-0.8.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore-db/download/underscore-db-0.8.1.tgz"},"directories":{},"publish_time":1415246044236,"_hasShrinkwrap":false,"_cnpm_publish_time":1415246044236,"_cnpmcore_publish_time":"2021-12-16T21:24:02.784Z"},"0.8.0":{"name":"underscore-db","version":"0.8.0","description":"Use JavaScript objects as databases","main":"src/node.js","scripts":{"test":"grunt test"},"author":{"name":"Typicode","email":"typicode@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/typicode/underscore-db.git"},"keywords":["JavaScript","Underscore","Lo-Dash","lodash","database","datastore","JSON","object","embed","embeddable"],"devDependencies":{"grunt":"~0.4.2","grunt-browserify":"~1.3.0","grunt-cli":"~0.1.11","grunt-contrib-jshint":"~0.7.2","grunt-contrib-uglify":"~0.2.7","grunt-contrib-watch":"~0.5.3","grunt-mocha-test":"~0.7.0","lodash":"^2.4.1","sinon":"~1.8.1","underscore":"^1.7.0"},"gitHead":"166cef6bd31675b6432975079149bc0840e2e989","bugs":{"url":"https://github.com/typicode/underscore-db/issues"},"homepage":"https://github.com/typicode/underscore-db","_id":"underscore-db@0.8.0","_shasum":"e9346889d72144e82788a4147dca6277457a45fd","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"dist":{"shasum":"e9346889d72144e82788a4147dca6277457a45fd","size":5224,"noattachment":false,"key":"/underscore-db/-/underscore-db-0.8.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore-db/download/underscore-db-0.8.0.tgz"},"directories":{},"publish_time":1411057467568,"_hasShrinkwrap":false,"_cnpm_publish_time":1411057467568,"_cnpmcore_publish_time":"2021-12-16T21:24:02.970Z"}},"readme":"# underscore-db [![Build Status](https://travis-ci.org/typicode/underscore-db.svg)](https://travis-ci.org/typicode/underscore-db) [![NPM version](https://badge.fury.io/js/underscore-db.svg)](http://badge.fury.io/js/underscore-db)\n\n> Adds functions to Underscore/Lodash for manipulating database-like objects.\n\nIt adds:\n* `getById`\n* `insert`\n* `upsert`\n* `updateById`\n* `updateWhere`\n* `replaceById`\n* `removeById`\n* `removeWhere`\n* `save`\n* `load`\n* `createId`\n\nData can be persisted using the filesystem or localStorage.\n\n__[Live example](http://typicode.github.io/underscore-db/)__\n\n__Tip__ You can extend [lowdb](https://github.com/typicode/lowdb) with underscore-db.\n\n## Install\n\n__Node__\n\n```bash\n$ npm install lodash underscore-db\n```\n\n```javascript\nvar _   = require('lodash');\nvar _db = require('underscore-db');\n\n_.mixin(_db);\n```\n\n__Tip__ underscore-db is also compatible with underscore\n\n\n## Usage example\n\nCreate an empty database object\n\n```javascript\nvar db = {\n  posts: []\n}\n```\n\nCreate a post\n\n```javascript\nvar newPost = _.insert(db.posts, {title: 'foo'});\n```\n\nDisplay database `console.log(db)`\n\n```javascript\n{\n  posts: [\n    {title: \"foo\", id: \"5ca959c4-b5ab-4336-aa65-8a197b6dd9cb\"}\n  ]\n}\n```\n\nRetrieve post using underscore-db `get` or underscore `find` method\n\n```javascript\nvar post = _.getById(db.posts, newPost.id);\n\nvar post = _.find(db.posts, function(post) {\n  return post.title === 'foo'\n});\n```\n\nPersist\n\n```javascript\n_.save(db);\n```\n\n## API\n\nThe following database object is used in API examples.\n\n```javascript\nvar db = {\n  posts: [\n    {id: 1, body: 'one', published: false},\n    {id: 2, body: 'two', published: true}\n  ],\n  comments: [\n    {id: 1, body: 'foo', postId: 1},\n    {id: 2, body: 'bar', postId: 2}\n  ]\n}\n```\n\n__getById(collection, id)__\n\nFinds and returns document by id or undefined.\n\n```javascript\nvar post = _.getById(db.posts, 1);\n```\n\n__insert(collection, document)__\n\nAdds document to collection, sets an id and returns created document.\n\n```javascript\nvar post = _.insert(db.posts, {body: 'New post'});\n```\n\nIf the document already has an id, and it is the same as an existing document in the collection, an error is thrown.\n\n```javascript\n_.insert(db.posts, {id: 1, body: 'New post'});\n_.insert(db.posts, {id: 1, title: 'New title'}); // Throws an error\n```\n\n__upsert(collection, document)__\n\nAdds document to collection, sets an id and returns created document.\n\n```javascript\nvar post = _.upsert(db.posts, {body: 'New post'});\n```\n\nIf the document already has an id, it will be used to insert or replace.\n\n```javascript\n_.upsert(db.posts, {id: 1, body: 'New post'});\n_.upsert(db.posts, {id: 1, title: 'New title'});\n_.getById(db.posts, 1); // {id: 1, title: 'New title'}\n```\n\n__updateById(collection, id, attrs)__\n\nFinds document by id, copies properties to it and returns updated document or undefined.\n\n```javascript\nvar post = _.updateById(db.posts, 1, {body: 'Updated body'});\n```\n\n__updateWhere(collection, whereAttrs, attrs)__\n\nFinds documents using `_.where`, updates documents and returns updated documents or an empty array.\n\n```javascript\n// Publish all unpublished posts\nvar posts = _.updateWhere(db.posts, {published: false}, {published: true});\n```\n\n__replaceById(collection, id, attrs)__\n\nFinds document by id, replaces properties and returns document or undefined.\n\n```javascript\nvar post = _.replaceById(db.posts, 1, {foo: 'bar'});\n```\n\n__removeById(collection, id)__\n\nRemoves document from collection and returns it or undefined.\n\n```javascript\nvar comment = _.removeById(db.comments, 1);\n```\n\n__removeWhere(collection, whereAttrs)__\n\nRemoves documents from collection using `_.where` and returns removed documents or an empty array.\n\n```javascript\nvar comments = _.removeWhere(db.comments, {postId: 1});\n```\n\n__save(db, [destination])__\n\nPersists database using localStorage or filesystem. If no destination is specified it will save to `db` or `./db.json`.\n\n```javascript\n_.save(db);\n_.save(db, '/some/path/db.json');\n```\n\n__load([source])__\n\nLoads database from localStorage or filesystem. If no source is specified it will load from `db` or `./db.json`.\n\n```javascript\nvar db = _.load();\nvar db = _.load('/some/path/db.json');\n```\n\n__id__\n\nOverwrite it if you want to use another id property.\n\n```javascript\n_.id = '_id';\n```\n\n__createId(collectionName, doc)__\n\nCalled by underscore-db when a document is inserted. Overwrite it if you want to change id generation algorithm.\n\n```javascript\n_.createId = function(collectionName, doc) {\n  return collectionName + '-' + doc.name + '-' + _.random(1, 9999);\n}\n```\n\n## FAQ\n\n### How to query?\n\nEverything you need for querying is present in Underscore and Lodash: `where`, ```find```, ```map```, ```reduce```, ```filter```, ```reject```, ```sortBy```, ```groupBy```, ```countBy```, ...\n\nSee http://lodash.com/docs or http://underscorejs.org.\n\nExample:\n\n```javascript\n// Using Underscore\nvar topFivePosts = _(db.posts)\n  .chain()\n  .where({published: true})\n  .sortBy(function(post) {\n     return post.views;\n   })\n  .first(5)\n  .value();\n\n// Using Lodash\nvar topFivePosts = _(db.posts)\n  .where({published: true})\n  .sortBy('views')\n  .first(5)\n  .value();\n```\n\n### How to reduce file size?\n\nWith Lodash, you can create custom builds and include just what you need.\n\n\n```bash\n$ npm install -g lodash-cli\n$ lodash include=find,forEach,indexOf,filter,has\n```\n\nFor more build options, see http://lodash.com/custom-builds.\n\n## Changelog\n\nSee details changes for each version in the [release notes](https://github.com/typicode/underscore-db/releases).\n\n## License\n\nunderscore-db is released under the MIT License.\n","_attachments":{},"homepage":"https://github.com/typicode/underscore-db#readme","bugs":{"url":"https://github.com/typicode/underscore-db/issues"},"license":"MIT"}