Library to parse Firestore REST API JSON responses into plain JavaScript objects. v0.9.0 (latest) - stable, maintenance mode. Transforms Firestore's verbose type-keyed format (e.g., {stringValue: "foo"}) into natural JS types (e.g., "foo"). Unlike manual mapping or generic JSON manipulation, this library handles all Firestore value types recursively, including nested maps, arrays, timestamps, and references. Ideal for developers working directly with Firestore's REST API (not client SDK) who need clean output.
npm install firestore-parserNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a Firestore REST API response (with stringValue, integerValue, etc.) into a plain JS object with native types.
Use import FireStoreParser from 'firestore-parser' or dynamic import(). For CommonJS projects, use async import or downgrade to v0.7.1.
Create a .d.ts file: declare module 'firestore-parser' { export default function FireStoreParser(json: any): any; }Only pass the JSON from firestore.googleapis.com REST API response (e.g., the result of fetch(url).then(r => r.json())).
Manually convert: new Date(parsed.createdAt) if needed.
Use import FireStoreParser from 'firestore-parser' in an ESM context, or use dynamic import: const { default: FireStoreParser } = await import('firestore-parser').Define an interface for the Firestore response or use the library's return type (it returns any). Prefer not to manually access fields; instead pass the whole response to FireStoreParser.
Install @types/firestore-parser? (none exists). Instead, declare module manually as described in warnings. Alternatively, use // @ts-ignore.
No dependency data recorded yet.