sql-strip-comments
JSON →A zero-dependency library to remove line (-- ...) and block (/* ... */) comments from SQL code. Version 0.0.23 is the latest as of the metadata snapshot; the package sees low to moderate releases (last update appears 2020). Differentiators: it correctly ignores comments inside string literals, and does not treat adjacent operators like `--` as comment markers when inside double-quoted strings. Works in Node.js and browsers. Alternative to regex-based solutions that often break on edge cases with strings or multiline comments.
Resources
packagesql-strip-comments ↗
API endpoints
full doc /v1/registry/sql-strip-comments