1.0.4 • Published 2 years ago

wrapped-firebase v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

wrapped-firebase

a small firebase library for improved error handling

Installation

npm i wrapped-firebase

Example

import { getAuth } from "firebase/auth";
import { getFirestore } from "firebase/firestore";
import { fetchFirestoreDocument } from "wrapped-firebase";

const ref = doc(getFirestore(), "users", getAuth().currentUser.uid!);
const [res, error] = await fetchFirestoreDocument(ref);

if (error) {
  // handle
} else {
  cache(res);
}
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago