A TypeScript-native Postgres client library (v1.5.x, monthly releases) with minimal dependencies and a focus on performance and type safety. Unlike pg or node-postgres, zoo.pg ships pre-built TypeScript types, requires no external drivers, and supports ESM-only imports. Designed for modern Node.js (14+) and Deno environments, it provides prepared statements, connection pooling, and transaction support out of the box.
npm install zoo.pgNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows ESM import, connection setup with environment variable for password, simple query, and cleanup.
Use import syntax instead of require().
Update to version 1.5.0 or later, or use explicit type annotation.
Pass options object with max: number when creating the client.
Replace $1 with ? in parameterized queries.
Use import postgres from 'zoo.pg' instead of require.
Set "type": "module" in package.json or use .mjs extension.
Use ? as placeholder in parameterized queries.