
Security News
NVD Quietly Sweeps 100K+ CVEs Into a “Deferred” Black Hole
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
extended-angular-firestore
Advanced tools
Lightweight extension of Angular Firestore. Provides a more intuitive API. Create, Update, Insert-or-Update (Upsert), Check for Existence, Download Once, Download and Listen for Changes.
Lightweight extension of Angular Firestore. Provides a more intuitive API. Create, Update, Insert-or-Update (Upsert), Check for Existence, Download Once, Download and listen for changes.
npm install extended-angular-firestore --save
import { ExtendedAngularFirestore } from 'extended-angular-firestore';
export class Example {
constructor(eaf: ExtendedAngularFirestore) {
const ref = 'reference string to Firestore database location';
const doc: DocType = documentOfYourChoiceHere;
eaf.createNewDocument<DocType>(ref, doc); // creates a new doc at reference ref
eaf.updateExistingDocument<DocType>(ref, doc); // updates existing document with value doc
eaf.upsert<DocType>(ref, doc); // updates the document if it exists
// otherwise, creates a new document at reference ref
}
}
The goal of the API is to help the programmer manage Observable Subscriptions, so you only ask for exactly what you want. You can either ask to download a document or a collection exactly once, in which case you get back a Promise that resolves to the value of the document you are requesting. Or you can listen to a document or a collection, in which case you get back an Observable you can subscribe to (and might have to unsubscribe from). This structure has helped me avoid annoying double-request errors where I failed to unsubscribe from a stream I hadn't realized I was still subscribed to.
This package also handles existence/nonexistence gracefully, which has been a weakness of both Firebase and Firestore in the past. To create or modify a document, simply use the Upsert method, which does the existence checking for you.
Finally, the API extension is lightweight -- about 100 lines of TypeScript and three RXJS operators (which AngularFire may already need).
FAQs
Lightweight extension of Angular Firestore. Provides a more intuitive API. Create, Update, Insert-or-Update (Upsert), Check for Existence, Download Once, Download and Listen for Changes.
The npm package extended-angular-firestore receives a total of 71 weekly downloads. As such, extended-angular-firestore popularity was classified as not popular.
We found that extended-angular-firestore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
Research
Security News
Lazarus-linked threat actors expand their npm malware campaign with new RAT loaders, hex obfuscation, and over 5,600 downloads across 11 packages.
Security News
Safari 18.4 adds support for Iterator Helpers and two other TC39 JavaScript features, bringing full cross-browser coverage to key parts of the ECMAScript spec.