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

@nietzsci/zarith-templates

v0.3.2

Published

POS Native Core industry receipt templates (beauty / refund / batch close / retail / kitchen)

Readme

@nietzsci/zarith-templates

5 套行业小票模板(BB365 主用 + 通用扩展演示)。

模板清单

| id | 函数 | 用途 | |---|---|---| | beauty_sale_v1 | beautyServiceTemplate | 美业服务单(BB365 主用) | | refund_v1 | refundTemplate | 退款单(含可选签名位) | | batch_close_v1 | batchCloseTemplate | 批结日报(含按卡品牌汇总) | | retail_sale_v1 | retailTemplate | 零售通用销售单(含找零 + 会员积分) | | kitchen_ticket_v1 | kitchenTemplate | 餐饮厨房单(大字号 + 辣度标记 + 蜂鸣) |

用法

import { beautyServiceTemplate } from '@nietzsci/zarith-templates';

const builder = beautyServiceTemplate({
  storeName: 'BB365 美业沙龙',
  orderId: 'SO-001',
  timestamp: new Date(),
  staffName: '小美',
  services: [{ name: '美甲基础款', duration: 60, price: 25.0 }],
  subtotal: 25.0,
  total: 25.0,
  paymentMethod: 'card',
  cardBrand: 'VISA',
  cardLast4: '1234',
});

// 模板返回 ReceiptBuilder,业务方可继续 chain
builder.feed(1).barcode('SO-001');

await pos.print.receipt({ dsl: builder.build() });

设计原则

  1. 每个模板都返回 ReceiptBuilder(不是 DslRoot),让业务方还能继续 chain
  2. 强类型 input:每个模板有自己的 data interface
  3. 合理默认:纸宽默认 80mm,可传 paperWidth: 58 切换
  4. 不预设语言:所有文案在模板内部硬编码(v1 不做 i18n,v1.x 后做)

npm 安装

本包已公开发布在 npm@nietzsci/zarith-templates,0.1.1),直接安装即可(运行时依赖 @nietzsci/zarith-receipt,需一并安装):

npm i @nietzsci/zarith-templates @nietzsci/zarith-receipt