文件名称:scrapbox-parser:Scrapbox表示法→JavaScript对象
文件大小:244KB
文件格式:ZIP
更新时间:2024-03-16 23:50:29
nodejs parser typescript scrapbox TypeScript
Scrapbox解析器 将Scrapbox表示法解析为JavaScript对象 安装 $ npm i @progfay/scrapbox-parser 用法 import { parse } from '@progfay/scrapbox-parser' import fetch from 'node-fetch' 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 ) )