Socket
Socket
Sign inDemoInstall

underscore.db

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

underscore.db - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

bower_components/underscore.db/.bower.json

2

bower.json
{
"name": "underscore.db",
"main": "dist/underscore.db.js",
"version": "0.2.1",
"version": "0.3.0",
"homepage": "https://github.com/typicode/underscore.db",

@@ -6,0 +6,0 @@ "authors": [

@@ -41,3 +41,3 @@ (function(root) {

var index = _.indexOf(array, item);
if (index != 1) array.splice(index, 1);
if (index != -1) array.splice(index, 1);
}

@@ -73,3 +73,3 @@

function updateWhere(collection, attrs, whereAttrs) {
function updateWhere(collection, whereAttrs, attrs) {
var docs = _.where(collection, whereAttrs);

@@ -109,2 +109,2 @@

_.removeWhere = removeWhere;
})(this);
})(this);

@@ -1,2 +0,2 @@

/*! underscore.db 0.2.1 */
!function(a){function b(a){return a?(a^16*Math.random()>>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,b)}function c(a,b){l.each(b,function(b,c){a[c]=b})}function d(a,b){var c=l.indexOf(a,b);1!=c&&a.splice(c,1)}function e(a,b){return l.find(a,function(a){return a.id===b})}function f(){return b()}function g(a,b){var c=l.clone(b);return c.hasOwnProperty("id")||(c.id=l.createId(a)),a.push(c),c}function h(a,b,d){var f=e(a,b);return f&&c(f,d),f}function i(a,b,d){var e=l.where(a,d);return e.forEach(function(a){c(a,b)}),e}function j(a,b){var c=e(a,b);return d(a,c),c}function k(a,b){var c=l.where(a,b);return c.forEach(function(b){d(a,b)}),c}var l=a._||require("underscore");l.get=e,l.createId=f,l.insert=g,l.update=h,l.updateWhere=i,l.remove=j,l.removeWhere=k}(this);
/*! underscore.db 0.3.0 */
!function(a){function b(a){return a?(a^16*Math.random()>>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,b)}function c(a,b){l.each(b,function(b,c){a[c]=b})}function d(a,b){var c=l.indexOf(a,b);-1!=c&&a.splice(c,1)}function e(a,b){return l.find(a,function(a){return a.id===b})}function f(){return b()}function g(a,b){var c=l.clone(b);return c.hasOwnProperty("id")||(c.id=l.createId(a)),a.push(c),c}function h(a,b,d){var f=e(a,b);return f&&c(f,d),f}function i(a,b,d){var e=l.where(a,b);return e.forEach(function(a){c(a,d)}),e}function j(a,b){var c=e(a,b);return d(a,c),c}function k(a,b){var c=l.where(a,b);return c.forEach(function(b){d(a,b)}),c}var l=a._||require("underscore");l.get=e,l.createId=f,l.insert=g,l.update=h,l.updateWhere=i,l.remove=j,l.removeWhere=k}(this);
{
"name": "underscore.db",
"version": "0.2.1",
"version": "0.3.0",
"description": "Use JavaScript objects as databases",

@@ -5,0 +5,0 @@ "main": "dist/underscore.db.js",

@@ -7,4 +7,6 @@ [![Build Status](https://travis-ci.org/typicode/underscore.db.png)](https://travis-ci.org/typicode/underscore.db)

A small pure JavaScript database for Node, node-webkit and the browser.
> A small pure JavaScript database for Node, node-webkit and the browser.
You can try it online [here](http://typicode.github.io/underscore.db/).
## Introduction

@@ -77,3 +79,3 @@

### updateWhere(collection, attrs, whereAttrs)
### updateWhere(collection, whereAttrs, attrs)

@@ -84,3 +86,3 @@ Finds documents using ```where```, updates documents and returns updated documents or an empty array.

// Publish all unpublished posts
var posts = _.updateWhere(db.posts, {published: true}, {published: false});
var posts = _.updateWhere(db.posts, {published: false}, {published: true});
```

@@ -87,0 +89,0 @@

@@ -41,3 +41,3 @@ (function(root) {

var index = _.indexOf(array, item);
if (index != 1) array.splice(index, 1);
if (index != -1) array.splice(index, 1);
}

@@ -73,3 +73,3 @@

function updateWhere(collection, attrs, whereAttrs) {
function updateWhere(collection, whereAttrs, attrs) {
var docs = _.where(collection, whereAttrs);

@@ -109,2 +109,2 @@

_.removeWhere = removeWhere;
})(this);
})(this);
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