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 🙏

© 2025 – Pkg Stats / Ryan Hefner

opencmd-tinge

v0.0.15

Published

<h1 align="center">欢迎使用 Tinge 🎨</h1>

Readme

TypeScript Node.js NPM

English | 简体中文

一个用于 Node.js 应用程序的终端文本样式库,具有链式语法。

✨ 特性

  • 🎨 丰富的文本样式,支持颜色和格式化
  • ⛓️ 链式 API,便于组合使用
  • 📝 支持缩进和换行
  • 🎯 内置 TypeScript 支持

📦 安装

npm install tinge

🚀 使用方法

基础样式

import { Styled } from 'tinge';

const text = Styled()
  .Red('你好')
  .Space()
  .Green('世界')
  .toString();

console.log(text);

多重样式

import { Styled } from 'tinge';

const text = Styled()
  .With(bold, italic)
  .Text('粗体和斜体')
  .toString();

console.log(text);

缩进和换行

import { Styled } from 'tinge';

const text = Styled()
  .Indent(2)
  .Blue('缩进文本')
  .Newline()
  .Green('新行')
  .toString();

console.log(text);

🎨 可用样式

  • 颜色:Red(红色), Green(绿色), Blue(蓝色), Yellow(黄色), Magenta(品红), Cyan(青色), White(白色), Black(黑色), Gray(灰色), Grey(灰色)
  • 格式化:Bold(粗体), Italic(斜体), BoldItalic(粗斜体)

📚 API 参考

主要方法

  • Styled() - 创建新的样式文本实例
  • Indent(spaces: number) - 设置缩进级别
  • Space(n?: number) - 添加空格
  • Newline() - 添加换行
  • Text(text: string) - 添加纯文本

样式方法

  • Red(text: string) - 红色文本
  • Green(text: string) - 绿色文本
  • Blue(text: string) - 蓝色文本
  • Yellow(text: string) - 黄色文本
  • Magenta(text: string) - 品红色文本
  • White(text: string) - 白色文本
  • Black(text: string) - 黑色文本
  • Gray(text: string) - 灰色文本
  • Grey(text: string) - 灰色文本
  • Bold(text: string) - 粗体文本
  • Italic(text: string) - 斜体文本
  • BoldItalic(text: string) - 粗斜体文本

组合使用

  • With(...styles: ChalkStyle[]) - 组合多个样式

🤝 贡献

欢迎提交贡献、问题和功能请求! 如果您想参与贡献,请查看 issues 页面

📝 许可证

本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。