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

@nostar/conver2xor

v0.0.4

Published

图片解析

Downloads

9

Readme

解析图片方库库

使用方式

推荐使用cdn的方法,方便日后更新

通过 cdn【推荐】

<script src="https://zuhaowan.zuhaowan.com/static/zhwfe/static/lib/conver2xor/index.js"></script>
<script>
  new Conver2xor(url, options).then((res) => {});
</script>

通过 npm

npm i @nostar/conver2xor -S
import Conver2xor from '@nostar/conver2xor';

new Conver2xor(url, options).then((res) => {});

参数说明

| 参数名 | 描述 | 类型 | 默认 | 举例 | | ------- | -------- | ------------- | ---- | ------------------------------------- | | url | 文件地址 | string/array | | '1.zhwv1' , ['1.zhwv1','2.zhwv2'] | | options | 配置参数 | object,见下文 | | |

urlhttp(s)//开始,则不会在前面追加options.baseURL

url不以.zhwv(\d+)结尾,则会返回原 url

options 配置参数

| 参数名 | 描述 | 类型 | 默认 | 举例 | | ----------- | ---------------------------- | ------ | ------------------------------ | --------------- | | pwds | 各个版本对应的秘钥 | object | 保密 | { v1: 'pwd' } | | sliceIndexs | 各个版本对应的下标,全量为 0 | object | 200 | { v2: 200 } | | baseURL | 基础 url 前缀 | string | https://qnpicnew.zuhaowan.com/ | |

new Conver2xor(url, options)返回 promise, 返回值 res 参数如下

返回值说明

返回格式

url 为 string

| 参数名 | 描述 | 类型 | 备注 | | --------- | -------------- | ------- | -------------------------------------------------------------- | | success | 是否成功 | boolean | | | code | 成功或错误编码 | int | 0 成功1 解密错误2 请求错误3 非.zhwv1 或.zhwv2 结尾 | | url | 传入的参数 url | string | | | full_path | 请求的 url | string | |

{
  success: true,
  code: 0,
  data: 'data:image/jpeg;base64,......',
  url: url,
  full_url: baseURL + url
}

url 为 array。data 为数组,data 中每一项同上。

| 参数名 | 描述 | 类型 | 备注 | | ------- | -------------- | ------- | ---------------------------------------------------------------------------------- | | success | 是否全部成功 | boolean | | | code | 成功或错误编码 | int | 0 成功1 一项或多项失败-1 当前环境不支持 Uint8Array-2 未传递 url 或为空 |

{
  success: true,
  code: 0,
  data: [
    {
      success: true,
      code: 0,
      data: 'data:image/jpeg;base64,......',
      url: url,
      full_url: baseURL + url
    },
    {
      success: true,
      code: 0,
      data: 'data:image/jpeg;base64,......',
      url: url,
      full_url: baseURL + url
    },
  ]
}