New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

gmail-lang

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gmail-lang

Gmail language support for CodeMirror

latest
Source
npmnpm
Version
0.1.12
Version published
Maintainers
1
Created
Source

Gmail query language

This Project only provides

  • The LR Lezer grammar for the Gmail query language
  • The code mirror language extension
  • An AST query transformer to an intermedia representation
  • A query interpreter to evaluate mail queries from the intermedia representation

Getting started

Install the npm package

npm i gmail-lang

yarn add gmail-lang

Import the gmail language from your code and use it.

import { Gmail } from 'gmail-lang'

The package also exports:

  • Gmail which is the code mirror language extension
  • parser which is the Lezer Gmail parser to create a Lezer tree from the source code
  • makeQuery, is a function which receives the code mirror state, a tree and returns the respective query
  • sourceToQuery is a function which receives the source code and returns the corresponding Gmail query
  • evalQuery is a function which receives a query, a data source and evaluates the query returning the result of evaluating the query.
  • evalLangQuery is a function which receives a source and a data source and evaluates the query returning the result of evaluating the query.

The data source must respect the next interface:

  • filterByMatch
  • allByKeyword
  • intersection
  • union
  • difference

FAQs

Package last updated on 27 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts