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

seraph

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seraph - npm Package Compare versions

Comparing version 0.6.6 to 0.6.7

4

lib/node.js

@@ -27,3 +27,3 @@ /* -*- Mode: Javascript; js-indent-level: 2 -*- */

var id = this._getId(obj, true);
var id = this._getId(obj, !key);

@@ -85,3 +85,3 @@ if (!this._isValidId(id)) {

_updateProp: function(obj, key, val, callback) {
var id = this._getId(obj, true);
var id = this._getId(obj);
if (!this._isValidId(id)) {

@@ -88,0 +88,0 @@ return callback(new Error("Invalid ID"));

@@ -8,3 +8,3 @@ {

"description": "A thin and familiar layer between node and neo4j's REST api.",
"version": "0.6.6",
"version": "0.6.7",
"repository": {

@@ -11,0 +11,0 @@ "url": "https://github.com/brikteknologier/seraph"

@@ -125,2 +125,20 @@ /* -*- Mode: Javascript; js-indent-level: 2 -*- */

it('should save a single property of an object, specifying only id', function(done) {
db.save({name: 'bob', age: 46}, function(err, node) {
assert(!err)
assert.equal(node.name, 'bob');
assert.equal(node.age, 46);
node.name = 'hidden name man';
db.save(node.id, 'age', 47, function(err, node) {
assert(!err);
db.read(node, function(err, node) {
assert(!err);
assert.equal(node.age, 47);
assert.equal(node.name, 'bob');
done();
});
});
});
});
it('should delete a single property of an object', function(done) {

@@ -148,2 +166,24 @@ db.save({name: 'bob', age: 46}, function(err, node) {

it('should delete a single property of an object, specifying only id', function(done) {
db.save({name: 'bob', age: 46}, function(err, node) {
assert(!err)
assert.equal(node.name, 'bob');
assert.equal(node.age, 46);
node.name = 'hidden name man';
db.save(node, 'age', 47, function(err, node) {
assert(!err);
db.delete(node.id, 'age', function(err) {
assert(!err);
db.read(node, function(err, node) {
console.log(err)
assert(!err);
assert(node.age == null);
assert(node.name == 'bob');
done();
});
});
});
});
});
it('should read a single property of an object', function(done) {

@@ -150,0 +190,0 @@ db.save({name: 'bob', age: 47}, function(err, node) {

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