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 🙏

© 2024 – Pkg Stats / Ryan Hefner

vitevuu

v1.0.9

Published

<!-- * @abstract: JianJie * @version: 0.0.1 * @Author: bhabgs * @Date: 2021-02-23 13:22:47 * @LastEditors: bhabgs * @LastEditTime: 2021-02-26 11:13:10 -->

Downloads

2

Readme

util 文档

NPM module NPM downloads

现状

工具目前分为 4 块

  1. axios 数据请求封装,内部使用
  2. base 通用基础工具,按需审核添加进入
  3. checkuser 内部使用工具,用于检查智信用户登录信息
  4. getQuery 根据浏览器 url 获取 query 值,拥有多种玩法

使用方式

  • 安装

    yarn add vitevuu -D / npm i vitevuu -D

  • 使用

  1. 在 vue3.0 中使用

    可以注册到全局进行使用,可以在需要的时候进行引用,全局引用需要给 vue 原型上添加相关类型,方便代码提示。

    • main.ts

      import { createApp } from 'vue';
      import reg from './registered';
      import App from './lay';
      import vitevuu from 'vitevuu';
      vue.config.globalProperties.$vitevuu = vitevuu;
      • *.d.ts
      import vitevuu from 'vitevuu';
      declare module '@vue/runtime-core' {
        export interface ComponentCustomProperties {
          $vitevuu: typeof vitevuu;
        }
      }

预期

为了工具具有更好的维护性与可玩性,axios 和 checkUser 将会逐步剔除,加入更多的实用性工具。

规范

  1. 导出类 必须使用大写字母开头
  2. 如果即将加入的工具,可能会拓展为大型工具,请放入文件夹内,并建立相关的.md 文件
  3. 说明文档编写 需说明改功能的使用范围以及使用方式
  • 如下:

    作用: 用于获取浏览器或者字符串中的 query 值。

    使用方式:

    import { getQueryString, getAllQuery } from 'getQuery';
    const url = 'https://www.bhabgs.com?name=bhabgs&age=26';
    // 如果未传入 url,将会默认获取window的url
    const name = getQueryString('name', url)<string, ?string>;
    console.log(name); // name = bhabgs

canvas 签名(2021-11-04 新增)

目前是简单版本 支持返回 base64 文本,clear,

import vitevuu, { signature } from 'vitevuu';

// 初始化
const signature = new vitevuu.signature({
  ele: 'canvas', // 元素id
  width: 400,
  height: 400,
  lineWidth: 2, // 线条粗细
  fontColor: 'red', // 线条颜色
});

// 清除
signature.clear();

// 获取png
signature.getPNGImage();