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

@digital-rd/secure-upload-notifier

v1.0.3

Published

一个安全上传提醒的npm包,使用TypeScript和Rollup构建。

Readme

README.md

Secure Upload Notifier

Secure Upload Notifier 是一个用于上传文件时发送通知的 npm 包。该项目主要使用 TypeScript 和 Rollup 构建,旨在提供一个简单而有效的方式来提醒用户上传文件的注意事项。

功能

  • 自动检测页面是否有上传元素
  • 自动触发上传文件时的安全警告
  • 支持自定义安全警告的内容和样式
  • 支持移动端

安装

使用 yarn / pnpm 安装:

# yarn
yarn add @digital-rd/secure-upload-notifier
# pnpm
pnpm add @digital-rd/secure-upload-notifier

使用

import { Notifier,  createNotifier, NotifierConfig } from '@digital-rd/secure-upload-notifier';

// 初始化通知器
const notifier = new createNotifier();
notifier.init()

// 自定义配置
const notifierConfig: NotifierConfig = { ... }
notifier.init(notifierConfig)

默认配置

const defaultConfig: NotifierConfig = {
  // 警告框配置
  alert: {
    duration: 0, // 持续时间(ms),0 表示一直显示
    position: {
      top: "20px",
      right: "20px",
    },
    width: {
      min: "400px",
      max: "450px",
    },
    animation: {
      duration: 300, // 动画时间(ms)
      type: "ease-in-out",
    },
    resetTimeout: 2 * 60 * 1000, // 状态重置时间(ms)
    mobile: {
      position: {
        top: "20px",
        left: "10px",
        right: "10px",
      },
      width: {
        min: "300px",
        max: "100%", // 移动端宽度建议跟随屏幕
      },
      padding: "12px 15px", // 移动端内边距可以适当调整
    },
  },

  // UI配置
  ui: {
    icon: `<svg viewBox="0 0 30 30" width="30" height="30">
              <path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z" fill="currentColor"/>
            </svg>`,
    title: "警告",
    message: "严禁在本互联网非涉密平台处理传输国家秘密,请确认扫描传输的文件、资料不涉及国家秘密。",
    closeButton: "×",
  },

  // 样式配置
  style: {
    colors: {
      primary: "#ff4d4f",
      text: "#333333",
      close: "#999",
      closeHover: "#666",
    },
    borderRadius: "4px",
    boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
  },

  // 上传组件选择器
  uploadSelectors: [
    ".el-upload",
    'input[type="file"]',
    ".ant-upload",
    ".van-uploader", // 移动端常用上传组件
    ".weui-uploader",
    ".am-upload",
    ".mui-upload",
    ".mint-upload",
    "[data-role='mobile-upload']",
  ],
};