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

digital_tool

v1.1.4

Published

##1.使用通用函数

Downloads

41

Readme

操作指南

##1.使用通用函数

    let common = require('digital_tool/common')
    或者这么用
    let common = require('digital_tool').COMMON

    console.log(common.isMobile(111))

###可用函数列表

    1.获取url参数    getQueryString(key)
    2.判断手机号码   isMobile(mobile)
    3.判断是否为微信  isWeiXin()
    4.判断是否为游戏  isEmail(email)
    5.Url图转base64  convertImgToBase64(url, callback, outputFormat)
    6.blob转base64   blobToDataURL(blob, callback)
    7.base64转blob   dataURLtoBlob(bas64)

##2.使用 Notionbase ICE API

###可用函数列表

   * 1. 获取七牛token          getQNToken()                                    无参数
   * 2. 发送验证码             sendMobileCode(mobile)                           mobile    - 手机号码
   * 3. 手机+验证码获取token    authMobile(mobile,code)                          mobile    - 手机号码      code   - 验证码
   * 4. 微信openid 获取token   authOpenid(openid,appid)                         openid    - 用户openid    appid  - 公众号appid
   * 5. 匿名获取token          authUnverified(key,value)                        key       - 自定义字段名   value  - 字段值
   * 6. 邀请函Code获取token    authPassport(app_id,code)                         app_id    - 应用id        code   - 邀请函code   参数示例:"key":"mobile"  "value":"13168879797"
   * 7. 第三方渠道登录Token    authChannel(channel,openid)                       channel   - 渠道名称      openid - openid      参数示例: "channel":"威马汽车"  "openid":"sdaskdjhaskjdhajkh"
   * 8. 注册邀请函     registerInvitation(app_id,data,token)                     app_id    - 应用id        data   - 邀请函内容  token - 用户token
   * 9. 获取我的邀请函        myInvitation(app_id,token)                         app_id    - 应用id        token  - 用户token
   * 10.注册邀请函场次     registerPassports(app_id,session_id,token)            app_id - 应用id   session_id - 场次id  token - 用户token
   * 11.文件code获取文件     getAttachment(file_code)                            code       - 文件码
   * 12. 上传图片到七牛       uploadQNFile(file,qn_token)                        qn_token  - 七牛token ,  file -文件流或blob
   * 13. 创建文件            createAttachment(data,token)                       data      - 文件数据        token  - 用户token(非必传)    参数示例 data :{"app_id":111,"file_url":"https://qn.notionbase.com/files/1/20191112/FmWiP6ge90VQUGzeZcUbLArmpTRO.mp4","source": "test1"}
   * 14. 微信认证&&静默授权   wechatAuth(wechat_appid,redirect_url,scope,force)  wechat_appid - 公众号appid  redirect_url - 跳转地址 scope - 授权方式snsapi_userinfo  snsapi_base
   * 15. 获取微信信息        wechatUsers(wechat_appid,token)                    wechat_appid - 公众号appid       token - 微信授权token
   *
   * 返回内容 Promise

###使用方式

   let API = new require('digital_tool/api')('https://api.notionbase.com')
   或者这么用
   let API = new require('digital_tool').API('https://api.notionbase.com')

   API.getQNToken().then(res=>{let token = res.data.data.token})

##3.开启node http server

###socket 添加socket服务器 ###api 添加api路由 ###public 静态文件

##4.使用串口

##5.媒体播放