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

pipelogger

v1.0.0

Published

Using named pipes for output debugging

Readme

Pipelog

English | 中文

概述

Pipelog 是一个将日志输出写入命名管道(FIFO)的轻量工具,适合需要将日志流转发到其他进程的调试场景,避免干扰标准输出。这个项目最初是为了调试 OpenCode 插件而开发。

特性

  • 以时间戳前缀写入管道
  • 使用 util.inspect 序列化对象
  • 单例工厂,避免重复写入流
  • 兼容 Node.js 文件系统 API 与 Bun 运行时

环境要求

  • 支持命名管道的 POSIX 系统(例如 macOS、Linux)
  • Node.js 或 Bun 运行时

安装

bun add pipelogger
npm install pipelogger
pnpm add pipelogger
yarn add pipelogger

使用

请在 shell 中手动创建和删除命名管道,然后在 TypeScript 中写入日志。

mkfifo /tmp/pipelog-example
import { Pipelog } from "pipelogger";

const pipepath = "/tmp/pipelog-example";
const logger = Pipelog.factory(pipepath);
logger.log("Hello, Pipelog!");
logger.log({ scope: "pipe", ok: true });

另一个进程读取:

cat /tmp/pipelog-example

使用完毕后删除管道:

rm /tmp/pipelog-example

API

Pipelog.factory(pipepath, options?)

创建或返回单例实例。

  • pipepath: string,必填
  • options.encoding: BufferEncoding,可选(默认 utf8

Pipelog.getInstance()

返回已创建的实例。

log(...message)

将每个参数作为一行写入,并带 ISO 时间戳前缀。

destroy()

关闭写入流并清理单例。

开发

安装依赖:

bun install

运行测试:

bun test ./src/test.ts

使用 Bun 构建(压缩):

bun build src/index.ts --target node --format esm --minify --outdir dist

许可协议

MIT

贡献

欢迎提交 Issue 或 PR。请尽量提供复现步骤或测试。