@cerebral/firebase
Advanced tools
Comparing version 1.0.0 to 1.0.1-1502374632125
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
171722
1709
948
0
2