@rsql/emitter v1.6.0
@rsql/emitter
RSQL emitter for Node.js and Browsers
Installation
# with npm
npm install --save @rsql/emitter
# with yarn
yarn add @rsql/emitterAPI
emit(expression: ExpressionNode, options?: EmitOptions): string
Emits RSQL string from the Abstract Syntax Tree. The second parameter to emit is an optional object with the following
fields:
preferredQuote- Optional string. The preferred quote character to use whenemitencounters a comparison value that needs to be escaped by wrapping in quotes. Either"(the ASCII double quote character) or'(the ASCII single quote character). Defaults to"(the ASCII double quote character).optimizeQuotes- Optional boolean. Iftrue,emitwill override thepreferredQuotesetting on a comparison value-by-comparison value basis if doing so would shorten the emitted RSQL. Iffalse,emitwill use thepreferredQuoteas the quote character for all comparison values encountered. Defaults totrue.
emit can throw the following errors:
TypeError- in the case of invalid argument type passed to theemitfunction
License
MIT
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago