@digitak/grubber
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"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 @@ |
29886
161