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

firebase-unchained

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

firebase-unchained - npm Package Compare versions

Comparing version 1.5.0 to 2.0.0

54

lib/api.js

@@ -36,5 +36,3 @@ 'use strict';

var ref = path.once ? path : db.child(path);
return new Promise(function (resolve, reject) {
ref.once('value', resolve, reject);
});
return ref.once('value');
};

@@ -46,7 +44,3 @@ }

return db.pget(path).then(function (snap) {
var val = snap.exportVal();
if (val === null) {
throw new Error('No value at this path');
}
return val;
return snap.exportVal();
});

@@ -59,7 +53,3 @@ };

return db.pget(path).then(function (snap) {
var val = snap.val();
if (val === null) {
throw new Error('No value at this path');
}
return val;
return snap.val();
});

@@ -72,5 +62,2 @@ };

return db.pget(path).then(function (snap) {
if (!snap.hasChildren()) {
throw new Error('No child value at this path');
}
var results = [];

@@ -88,10 +75,3 @@ snap.forEach(function (childSnap) {

var ref = path.push ? path : db.child(path);
if (arguments.length < 2) {
return Promise.resolve(ref.push());
}
return new Promise(function (resolve, reject) {
ref.push(value, function (err) {
return err ? reject(err) : resolve();
});
});
return ref.push(value);
};

@@ -103,7 +83,3 @@ }

var ref = path.set ? path : db.child(path);
return new Promise(function (resolve, reject) {
ref.set(value, function (err) {
return err ? reject(err) : resolve();
});
});
return ref.set(value);
};

@@ -115,7 +91,3 @@ }

var ref = path.setWithPriority ? path : db.child(path);
return new Promise(function (resolve, reject) {
ref.setWithPriority(value, priority, function (err) {
return err ? reject(err) : resolve();
});
});
return ref.setWithPriority(value, priority);
};

@@ -134,7 +106,3 @@ }

var ref = path.update ? path : db.child(path);
return new Promise(function (resolve, reject) {
ref.update(value, function (err) {
return err ? reject(err) : resolve();
});
});
return ref.update(value);
};

@@ -146,7 +114,3 @@ }

var ref = path.remove ? path : db.child(path);
return new Promise(function (resolve, reject) {
ref.remove(function (err) {
return err ? reject(err) : resolve();
});
});
return ref.remove();
};

@@ -171,5 +135,5 @@ }

var value = options[option];
return query[option].call(query, value);
return query[option](value);
}, ref);
};
}

7

package.json
{
"name": "firebase-unchained",
"version": "1.5.0",
"description": "Promise version of Firebase API without chaining",
"version": "2.0.0",
"description": "Firebase API without chaining",
"main": "lib/index.js",

@@ -20,2 +20,5 @@ "repository": {

"license": "ISC",
"peerDependencies": {
"firebase": ">= 2.4.0 < 3"
},
"devDependencies": {

@@ -22,0 +25,0 @@ "babel-cli": "^6.3.17",

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