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

fileman-client

v1.0.2

Published

client side about reseful-fileman service.

Downloads

7

Readme

Fileman client

build status Test coverage NPM version NPM Downloads

开发了 fm push-img (doc 待续)

npm i -g fileman-client

一个迷你封装 from 一个小轮子 express-restful-fileman,用于方便管理静态的 sdk。 静态服务推荐使用另外一个小轮子 github-similar-server

如何使用

初始化

import * as fileman from 'fileman-sdk'
// token: 验证信息, ak,sk 有的话也在这初始化
// config: 一些乱七八糟别的配置,万一有什么拓展呢(上传自动重试次数,限制上传类型..
var client = new fileman(token, config);

上传

// file: Blob 对象,上传的文件(blob 对象 || <file path > node 环境 || dataurl ...)
// key: 文件资源名
// config (针对某特定资源的乱七八糟的配置?)
client.uploadFile(file, key, config);

/* 一些监听 */
var observer = {
  next(res){ //  提供上传进度信息
    // res.loaded(已上传大小)
    // res.total(本次上传的总量控制信息,注意这里的 total 跟文件大小并不一致)
    // res.percent(当前上传进度 0-100)
  },
  error(err){ // 上传错误后触发,xhr 请求错误,JSON 解析异常等,isRequestError,reqId,code,message
  }, 
  complete(res){ // ...
  }
}
// 开始上传
var subscription = observable.subscribe(observer)

// 取消上传
subscription.unsubscribe()

查询

client.listFiles(bucketName)
  .then(function (response) {
      var contents = response.body.contents;
      for (var i = 0, l = contents.length; i < l; i++) {
          console.log(contents[i].key);
      }
  })
  .catch(function (error) {
      // 查询失败
  });

下载

// 暂时不支持断点吧,下载就整个下载了
client.getFile(BucketName, Key)
    .then(function(response) {
        let buffer = response.body;
    });

删除

client.deleteFile(BucketName, Key)

FEATURE