Skip to content

Function: stripComments() ​

ts
function stripComments(sql): string;

Defined in: packages/core/src/script/parser.ts:120

Blank out every comment, LENGTH-PRESERVING: comment characters become spaces but newlines survive, so indexes, line and column positions in the result match the input exactly. Same scanner (and same errors) as parseScript/commentRanges.

Parameters ​

ParameterType
sqlstring

Returns ​

string

MIT Licensed. Contains data derived from the Firebird project under IDPL/IPL.