A lightweight, zero-dependency TypeScript library for determining the type of a SQLite SQL statement. Version 1.1.0 is the latest stable release, offering simple boolean functions for common SQL operations like SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, ALTER TABLE, DROP TABLE, CREATE/DROP INDEX, CREATE/ALTER/DROP VIEW, PRAGMA, transactions, VACUUM, ANALYZE, ATTACH/DETACH, and REINDEX. The library uses basic string matching, so it is fast and suitable for parsing simple statements without complex grammar. It currently does not support recursive or compound statements. Ship with full TypeScript declarations. Released under MIT license with infrequent updates.
npm install sqlite-statement-typeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import and use two of the type-checking functions to determine SQLite statement types.
Ensure SQL keywords are uppercase. For robust parsing, consider a full SQL parser.
Split compound statements before checking.
Use named imports or namespace import.
Use named imports like: import { isSelect } from 'sqlite-statement-type'Use ESM imports or destructure: const { isSelect } = require('sqlite-statement-type')Double-check the function name: it should be isSelect, isInsert, etc.
No dependency data recorded yet.