UNPKG

slonik-utilities

Version:

Utilities for manipulating data in PostgreSQL database using Slonik.

11 lines (10 loc) 386 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.escapeIdentifier = void 0; /** * @see https://github.com/brianc/node-postgres/blob/6c840aabb09f8a2d640800953f6b884b6841384c/lib/client.js#L306-L322 */ const escapeIdentifier = (identifier) => { return '"' + identifier.replaceAll('"', '""') + '"'; }; exports.escapeIdentifier = escapeIdentifier;