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

lzx-uploader

v1.0.6

Published

```npm npm install lzx-uploader ``` ## 二、使用方式 ```javascript import { Uploader } from 'lzx-uploader' ```

Downloads

15

Readme

使用方式

一、安装

npm install lzx-uploader

二、使用方式

import { Uploader } from 'lzx-uploader'
const uploader = new Uploader({
  el:document.getElementById("upload-button"), // 用于触发上传选择的元素
  env: 'pc', // pc 端 mobile 移动端
  chunkSize: 1024 * 4, //4kb的分片,默认分片大小为5M
  path: '/backend/storage/upload/prepare', // 服务器上传地址,请配置相关代理
  accept: 'image/*', // 接收的可上传的文件类型
  multiple:true, // 是否可进行多选
  getDetail:true // 是否获取文件详情
})
// loaded 上传的文件对应的进度百分比(0--100) number类型
uploader.$on('progress', (loaded, file, index) => {
  console.log('progress',loaded, file, index)
})
uploader.$on('md5', (files) => {
  console.log('md5', files)
})
// 上传完成
uploader.$on('success', (file, index) => {
  console.log('success', file, index)
})
// 上传暂停
uploader.$on('pause', (file, index) => {
  console.log('pause', file, index)
})
// 获取文件上传成功后的详细信息,需要设置getDetail为true才会触发此事件
uploader.$on('detail', (fileDetail, index) => {
  console.log('detail', fileDetail, index)
})