@haroldadmin/robots-parser
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@haroldadmin/robots-parser

A parser for robots.txt files.

Installation

npm install @haroldadmin/robots-parser

Usage

Use the parse function to convert a robots.txt string into a parse tree.

import { parse } from "@haroldadmin/robots-parser";

const res = await fetch("https://www.google.com/robots.txt");
const robotsTxt = await res.text();

const parseTree = parse(robotsTxt);

console.log(JSON.stringify(parseTree));

Package Sidebar

Install

npm i @haroldadmin/robots-parser

Weekly Downloads

1

Version

1.0.0

License

Apache-2.0

Unpacked Size

28.4 kB

Total Files

13

Last publish

Collaborators

  • haroldadmin