JSPM

firelordjs

2.2.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 204
  • Score
    100M100P100Q82739F
  • License MIT

🔥 Extremely High Precision Typescript Wrapper for Firestore Web, Providing Unparalleled Type Safe and Dev Experience

Package Exports

  • firelordjs
  • firelordjs/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (firelordjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

FirelordJS 烈火君JS

Created by tylim88   License   dependency count   package size   github action   code coverage   GitHub issues   vulnerabilities

Extremely High Precision Typescript Wrapper for Firestore Web, Providing Unparalleled Type Safe and Dev Experience


Modular, Minuscule, Intuitive, Unopinionated, Craftsmanship, Ultimate, Peaceful, Deep


Of The VFQAT     ||     By The VFQAT     ||     For The VFQAT


End Firestore Typing Madness



FirelordJS is the only library capable of providing insane type safety while exposing almost all the API of the official Firestore SDK.

FirelordJS has:

  • The lowest learning curve (API is nearly identical to the original API).
  • The lowest technical debt (easy to revert to the official API).
  • The truly and most generic type safe solutions.
  • The smallest.
  • The best code quality(tons of test + 3 stages of test: dev test, built test and package test)
  • The only library capable of typing against Firestore limitations.

Support @firebase/rules-unit-testing and emulator

I am confident it has the best type safe and nothing come close. I put money on my words and I will buy you x cups of coffee if you:

  1. found something better: 75 cups
  2. created something better: 1000 cups (you don't need to a make full fledge library, something that is minimally better is enough, open an issue if you want to take this challenge)

Trivial

  • The name Firelord is a reference to the Firelord of Avatar.

Contributing

Read here

  1. Firelord - Typescript wrapper for Firestore Admin
  2. FireSword - Filter Firestore and RTDB Unknown Keys.
  3. FireCall - Helper Function to write easier and safer Firebase onCall function.
  4. FireSageJS - Typescript wrapper for Realtime Database

Incoming V3

V3 focus on codebase overhaul, hopefully with further improved code quality, potential contributor will find it easier to work with.

Code Quality Improvements:

  • Simpler type logics.
  • Implement latest TS features.
  • Better file and folder structure.
  • Remove trivial APIs.
  • More Tests.
  • New Documentation.

New Features:

  • Auto narrow to literal type, remove the need to manually assert as const.
  • Better support for abstraction.
  • Narrow read type base on query constraint. For example where('a', '==', true) will narrow the read type of field a to true.
  • Mandatory update member. Example, for field like updatedAt, it is mandatory to includes it every time you update the document. There are two ways to implement these feature: via Meta Type and via abstraction. With Meta Type(using special field value), it is less flexible because we no longer able to exclude it from all update operations. With abstraction, it is more flexible but require more works from user. I prefer via abstraction due to it does not shut down other use cases.
  • Support wide numeric key and wide string key (Record<number, unknown> and Record<string, unknown>). This still need more consideration because this data type is pointless to query(we need to know what the key is first, it would be better to just save the document ID somewhere) and we need to constantly aware of the document size limit. If you don't care about query and you sure that the size limit will not exceed 1MB, then this is for you. But allowing this also open up for mistake and bad practice for those who are not aware. Most likely I will not implement this.