Socket
Socket
Sign inDemoInstall

@mintlify/grove

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mintlify/grove

Universal AST parser built on Tree-sitter


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Grove

Universal AST parser built on Tree-sitter for node

Version npm License Stars

import parser from '@mintlify/grove'

const code = 'print("Hello world")'
const languageId = 'python'

const parsed = parser(code, languageId) // get parsed AST

See the interactive demo for more information

Installation

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

Installation is done using the npm install command:

$ npm install @mintlify/grove

In order to use Grove, you have the build from the Rust dependency setup so it properly works for your operating system

$ npm install cargo-cp-artifact --save-dev
$ cd ./node_modules/@mintlify/grove/parser && npm run build

When deploying to production, make sure to run the above command during the build process

Usage

Import the package

import parser from '@mintlify/grove'

Pass in the code and language identifier as strings

const parsed = parser(code, languageId)

Currently Grove supports the following languages

LanguageIdentifier
JavaScriptjavascript
TypeScripttypescript
Pythonpython
PHPphp
React JSXjavascriptreact
React TSXtypescriptreact
Rubyruby
Rustrust
Javajava
Kotlinkotlin
Cc
C++cpp
C#csharp
Dartdart
Gogo

🚧 More languages are under construction and grows in accordance with Tree-sitter's available parsers

More Information

Website Twitter Discord

Built with 💚 by the Mintlify team

FAQs

Package last updated on 04 May 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc