Skip to content

progfay/scrapbox-parser

Repository files navigation

Scrapbox Parser

MIT License npm version Maintainability Test Coverage

parse Scrapbox notation to JavaScript Object

Installation

$ npm i @progfay/scrapbox-parser

Also, you can install @progfay/scrapbox-parser via JSR.

Usage

import { parse } from "@progfay/scrapbox-parser";

const PROJECT_NAME = "help";
const PAGE_NAME = "syntax";

fetch(`https://scrapbox.io/api/pages/${PROJECT_NAME}/${PAGE_NAME}/text`)
  .then((response) => response.text())
  .then((text) => parse(text));