npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@andares/pdfoundation

v1.0.1

Published

promptdown 的共享语义核心:解析 / 格式化 / 双向转换(零运行时依赖,Node 与 Web 通用;类型随 dist 同源发布)

Readme

@andares/pdfoundation

promptdown(.pd 极简标记语言)的共享语义核心——解析 / 格式化 / 双向转换,零运行时依赖,Node 与 Web 通用。

主包 @andares/promptdown(VSCode 扩展 + CLI)与 @andares/pdeditor(低 UI 输入框:工厂 + <pd-editor> + React 包装)共同依赖本包,保证语义单一来源、零漂移。语法规范见 docs/SPEC.md(唯一事实来源)。

安装

npm install @andares/pdfoundation

用法

import {
    format,          // 格式化(全角冒号→半角、键值规范化、顶层缩进修正)
    pdToJsonText,    // pd → JSON(解析错误抛异常,message 含行号)
    jsonToPdText,    // JSON → pd(宽容模式:不符合条目逐条警告,不整体失败)
    compilePdText,   // 多段编译:选段 + :refname / :%N 引用内联展开 + 统一 format
    detectTransformKind, // 识别输入是 pd 还是 json
    splitSections,   // 段切分(围栏感知)
} from "@andares/pdfoundation";

const json = pdToJsonText("//!pd 主段\n角色: 资深工程师\n约束:\n  - 只输出 JSON\n");
const pd = format(jsonToPdText(json).pd); // 回环
  • ESM / CJS 双格式(exports 映射),sideEffects: false 可树摇
  • 更多 API:sectionNames / selectSection / expand / detectPdIntent 等,见 dist/index.d.ts

License

MIT