lmangani / rust-flux-parser-js

wasm flux js parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

〰️ wasmy flux js parser

JS Flux parser in Rust

🥇 Install

npm install @qxip/wasmy_flux

Functions

  • get_tree to parse to AST tree
  • get_syntax_error to check for parsing error

🥈 Use

const { get_syntax_error, get_tree } = require("@qxip/wasmy_flux");

const source = 'from(bucket:"telegraf/aaa") |> limit(limit:100, offset:10)';

if (get_syntax_error(source) == "" ){
        console.log(get_tree(source));
} else { console.log(err) }

Credits

Based on wasmy_rust

About

wasm flux js parser

License:Apache License 2.0


Languages

Language:Rust 59.9%Language:JavaScript 40.1%