Gathering detailed insights and metrics for unistore-fire
Gathering detailed insights and metrics for unistore-fire
npm install unistore-fire
Typescript
Module System
Node Version
NPM Version
TypeScript (96.85%)
JavaScript (3.15%)
Total Downloads
859
Last Day
1
Last Week
1
Last Month
2
Last Year
79
1 Stars
9 Commits
3 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.1
Package Id
unistore-fire@1.0.1
Unpacked Size
18.80 kB
Size
4.00 kB
File Count
12
NPM Version
6.4.1
Node Version
10.11.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
1
Compared to previous week
Last month
-85.7%
2
Compared to previous month
Last year
-22.5%
79
Compared to previous year
2
1
This library relies on having firebase (web, admin or react-native) and unistore installed and initialized. If you haven't installed them previously :
1 yarn add unistore firebase 2 # or yarn add unistore firebase-admin 3 # or yarn add unistore react-native-firebase 4 # Or npm i unistore firebase
1 yarn add unistore-fire 2 # Or npm i unistore-fire
Map your Firebase database to unistore Stores.
This module exports 3 methods :
1import { toBox, toObject, toArray } from "unistore-fire"; 2 3const ref = firebase.database().ref("path/to/data"); 4const box = toBox(ref); 5box.getState(); // { value: valueFromFirebase } 6const map = toObject(ref); 7map.getState(); // { value: { [key:keyFromFirebase]: valueFromFirebase } } 8const array = toArray(ref); 9array.getState(); // { value: Array<{ key:keyFromFirebase, value:valueFromFirebase }> }
Any firebase ref, with or without sorting, limiting
A unistore store that always has the latest value of the ref inside it.
The state has the following shape :
1type State = { 2 value: ValueFromFirebase | null; 3};
The state has the following shape :
1type State = { 2 value: { [key: keyFromFirebase]: ValueFromFirebase } | null; 3};
The state has the following shape :
1type State = { 2 value: Array<{ key: keyFromFirebase; value: ValueFromFirebase }>; 3};
Check the tests for more examples !
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/9 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
101 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More