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

@cerebral/firebase

Package Overview
Dependencies
Maintainers
3
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cerebral/firebase - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1-1502374632125

14

lib/helpers.js

@@ -34,6 +34,14 @@ 'use strict';

return Object.keys(options).reduce(function (ref, key) {
if (key === 'payload' || key === 'asArray') {
return ref;
switch (key) {
case 'payload':
return ref;
case 'asArray':
return ref;
case 'orderByKey':
return options[key] ? ref[key]() : ref;
case 'orderByValue':
return options[key] ? ref[key]() : ref;
default:
return ref[key](options[key]);
}
return ref[key](options[key]);
}, _firebase2.default.database().ref(path));

@@ -40,0 +48,0 @@ }

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

function valueFactory(valuePath, options) {
function valueFactory(valuePath) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
function value(_ref) {

@@ -12,0 +14,0 @@ var firebase = _ref.firebase,

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

function value(path, options) {
function value(path) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var ref = (0, _helpers.createRef)(path, options);

@@ -15,0 +17,0 @@

{
"name": "@cerebral/firebase",
"version": "1.0.0",
"version": "1.0.1-1502374632125",
"description": "Firebase provider for Cerebral",

@@ -29,7 +29,7 @@ "main": "lib/index.js",

"peerDependencies": {
"cerebral": "^2.0.0"
"cerebral": "^2.0.1-1502374632125"
},
"devDependencies": {
"cerebral": "^2.0.0"
"cerebral": "^2.0.1-1502374632125"
}
}

@@ -333,5 +333,6 @@ # @cerebral/firebase

import {onValue} from '@cerebral/firebase/operators'
import {string, signal} from 'cerebral/tags'
export default [
onValue('foo.bar', 'some.signal')
 onValue(string`foo.bar`, signal`some.signal`)
]

@@ -369,7 +370,7 @@ ```

```javascript
import {state} from 'cerebral/tags'
import {state, string, signal} from 'cerebral/tags'
import {onChildAdded} from '@cerebral/firebase/operators'
export default [
onChildAdded('foo.bar', 'some.signal', {
 onChildAdded(string`foo.bar`, signal`some.signal`, {
orderByChild: 'count',

@@ -403,5 +404,6 @@ limitToFirst: state`config.limitToFirst`

import {onChildRemoved} from '@cerebral/firebase/operators'
import {string, signal} from 'cerebral/tags'
export default [
onChildRemoved('foo.bar', 'some.signal', {
 onChildRemoved(string`foo.bar`, signal`some.signal`, {
// Same options as above

@@ -434,5 +436,6 @@ })

import {onChildChanged} from '@cerebral/firebase/operators'
import {string, signal} from 'cerebral/tags'
export default [
onChildChanged('foo.bar', 'some.signal', {
 onChildChanged(string`foo.bar`, signal`some.signal`, {
// Same options as above

@@ -439,0 +442,0 @@ })

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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