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

@tachybase/plugin-field-bank-card-number

v1.6.1

Published

Bank card number field with formatted display (4 digits per group), smart input and smart copy. Supports up to 21 digits.

Downloads

315

Readme

银行卡号字段插件

简介

这是一个用于显示和输入银行卡号的字段插件,提供格式化显示、智能输入和智能复制功能。

银行卡号格式说明

常见银行卡号位数

不同银行的银行卡号位数和显示格式各不相同:

  • 16位:常见,卡面通常显示为 4-4-4-4
    • 示例:6222 0000 0000 0000
  • 19位:常见,卡面通常显示为 6-13
    • 示例:622200 0000000000000
  • 15位:不常见,如美国运通卡,卡面显示为 4-6-5
    • 示例:3782 822463 10005
  • 18位:不常见,如兴业银行,卡面显示为 6-6-6
    • 示例:622909 000000 000000

本插件的设计

为了提供统一、简洁的用户体验,本插件参考支付宝和微信的设计理念:

  • 统一格式:所有银行卡号统一采用 4位一组 的显示方式
  • 最大长度:虽然银行卡号标准最长为 19位,但参考支付宝的设计,本插件支持最长 21位,以兼容可能的特殊卡号
  • 最后一组:当卡号为 21位时,格式为 4-4-4-4-5(最后一组为5位)

功能特性

主要特点

  • 格式化显示:银行卡号自动格式化为每4位一组的形式

    • 16位:1234 5678 9012 3456
    • 19位:1234 5678 9012 3456 789
    • 21位:1234 5678 9012 3456 78901
  • 智能输入:输入时自动添加空格分隔符,无需手动输入空格

  • 智能复制:复制银行卡号时自动去除空格,只复制纯数字

    • 显示:6222 0000 0000 0000
    • 复制:6222000000000000
    • 方便粘贴到其他系统(如银行网站、支付平台等)
  • 数据存储:数据库中存储纯数字格式(不含空格)

  • 长度限制:支持最长21位银行卡号

  • 自动过滤:输入时自动过滤非数字字符

使用方法

  1. 在插件管理中启用"银行卡号字段"插件
  2. 在创建或编辑数据表时,添加新字段,选择字段类型为"银行卡号"
  3. 配置字段名称、显示名称等基本信息
  4. 保存后即可在表单中使用该字段

用户体验

  • 输入时:直接输入数字,系统自动添加空格分隔
  • 显示时:自动格式化为易读的分组形式
  • 复制时:Ctrl+C 或右键复制时,自动去除空格