Socket
Socket
Sign inDemoInstall

@digitak/grubber

Package Overview
Dependencies
0
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

4

package.json
{
"name": "@digitak/grubber",
"version": "1.0.0",
"version": "1.0.1",
"description": "Parse code files and patch it without having to use an AST",
"main": "library",
"main": "library/index.js",
"type": "module",

@@ -7,0 +7,0 @@ "files": [

@@ -5,3 +5,3 @@ ***Grubber*** is a lightweight and friendly utility to parse code with regular expressions in a 100% safe way - without having to use an AST 🐛

### How?
## How?

@@ -29,3 +29,3 @@ The problem with parsing a source file with regular expressions is that you cannot be sure your match is not commented or inside a string.

```ts
import { grub } from "grubber";
import { grub } from "@digitak/grubber";

@@ -44,2 +44,10 @@ const content = `

## Installation
Use your favorite package manager:
```
npm install @digitak/grubber
```
## Grubber API

@@ -105,3 +113,3 @@

// find all semi-colons inside the rust source code
grubber(rustCodeToParse, "rs").find(";");
grub(rustCodeToParse, "rs").find(";");
```

@@ -108,0 +116,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc