🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@ast-grep/lang-ruby

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ast-grep/lang-ruby

## Installation

npmnpm
Version
0.0.2
Version published
Weekly downloads
40K
11.56%
Maintainers
1
Weekly downloads
 
Created
Source

ast-grep napi language for ruby

Installation

In a pnpm project, run:

pnpm install @ast-grep/lang-ruby
pnpm install @ast-grep/napi
# install the tree-sitter-cli if no prebuild is available
pnpm install @tree-sitter/cli --save-dev

Usage

import ruby from '@ast-grep/lang-ruby'
import { registerDynamicLanguage, parse } from '@ast-grep/napi'

registerDynamicLanguage({ ruby })

const sg = parse('ruby', `your code`)
sg.root().kind()

Keywords

ast-grep

FAQs

Package last updated on 10 Apr 2025

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