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

tt-uploader

v1.6.1

Published

upload component for veVod and veImageX

Readme

tt-uploader

上传组件,支持火山引擎 veVod(视频点播)和 veImageX(图片服务)的文件上传功能。

功能特性

  • 支持视频和图片文件上传
  • 支持分片上传和直传两种模式
  • 支持断点续传
  • 支持上传进度监听
  • 支持暂停、恢复、取消上传
  • 支持本地缓存(localStorage)
  • 支持自定义配置和插件扩展

安装

npm i tt-uploader

使用示例

import TTUploader from 'tt-uploader'

const uploader = new TTUploader({
  stsToken: {
    // your sts token
  }
})

// 添加文件
const key = uploader.addFile({
  file: fileObject,
  // other options
})

// 监听上传进度
uploader.on('progress', (info) => {
  console.log('上传进度:', info.percent)
})

// 监听上传完成
uploader.on('complete', (info) => {
  console.log('上传成功:', info)
})

// 监听上传错误
uploader.on('error', (info) => {
  console.log('上传失败:', info)
})

// 开始上传
uploader.start(key)

文档

  • veVod: https://www.volcengine.com/docs/4/66560
  • veImageX: https://www.volcengine.com/docs/508/66132

更新日志

1.5.5

  • 支持 localStorage 和 enableDebugLog 打印日志

    • 新增 enableDebugLog 配置项,支持通过配置或 localStorage 控制调试日志输出
    • 支持通过 localStorage 设置调试日志开关
  • 添加 useFileNameInCacheKey 选项,增强缓存功能

    • 支持使用文件名作为缓存 key 的一部分,提升缓存准确性
  • 支持自定义 TOP 请求

    • 优化 apply 和 commit 阶段的请求处理逻辑
  • 确保容灾请求会带上对应的 gateway header

    • 修复容灾切换时 header 丢失导致失败请求成功的问题
  • 优化错误处理逻辑

    • 当遇到错误码 4024(InMergedError)和 4025(AlreadyExistedError)时,自动清空本地缓存,避免使用过期缓存导致一直失败
    • 优化重试和错误日志打印逻辑