Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

viewmodel

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

viewmodel - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

6

lib/databases/inMemory.js

@@ -6,3 +6,3 @@ // lib/databases/inMemory.js v0.1.0

, store = {}
, idCounter = 0;
, uuid = require('../uuid');

@@ -62,3 +62,3 @@ function deepFind(obj, pattern) {

if (callback) callback(null, (idCounter++).toString());
if (callback) callback(null, uuid().toString());
},

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

callback = id;
id = (idCounter++).toString();
id = uuid().toString();
}

@@ -80,0 +80,0 @@

{
"author": "adrai",
"name": "viewmodel",
"version": "0.3.1",
"version": "0.3.2",
"private": false,

@@ -6,0 +6,0 @@ "main": "index.js",

@@ -524,2 +524,4 @@ var expect = require('expect.js')

var obj, retObj;
it('it should insert a new record', function(done) {

@@ -529,3 +531,5 @@

vm.foo = 'baz';
dummyRepo.commit(vm, function(err) {
obj = vm;
dummyRepo.commit(vm, function(err, ret) {
retObj = ret;
dummyRepo.get('4569', function(err, vm2) {

@@ -542,2 +546,13 @@ vm.actionOnCommit = 'update';

describe('and', function() {
it('it should return the vm with updated actionOnCommit', function() {
expect(obj.id).to.eql(retObj.id);
expect(retObj.actionOnCommit).to.eql('update');
});
});
});

@@ -571,2 +586,4 @@

var obj, retObj;
it('it should update the existing record', function(done) {

@@ -576,3 +593,5 @@

vm.foo = 'baz';
dummyRepo.commit(vm, function(err) {
obj = vm;
dummyRepo.commit(vm, function(err, ret) {
retObj = ret;
dummyRepo.get('4567', function(err, vm2) {

@@ -588,2 +607,13 @@ expect(vm2.id).to.eql(vm.id);

describe('and', function() {
it('it should return the vm with updated actionOnCommit', function() {
expect(obj.id).to.eql(retObj.id);
expect(retObj.actionOnCommit).to.eql('update');
});
});
});

@@ -590,0 +620,0 @@

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