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

gt-mp-utils

v1.1.1

Published

小程序组件库

Downloads

5

Readme

小程序utils库

utils开发

拉取代码后,

# 打开小程序utils项目
cd packages/gt-mp-utils
# 安装依赖
npm i

开发规范:

1)提供的工具函数,都需要添加注释说明和使用demo;

2)建议使用单方法单文件的形式,方便使用时快速查找util;

3)建议使用ts编写;

utils 自测

部分小程序方法涉及到小程序原生能力,可在小程序环境单独测试

使用jest 方式,为每个方法创建单测用例;

单测文件添加至/test 文件下;

运行单测命令:

npm run test

注释和单测文件可用copilot生成

测试完成后,发布npm包

  • 发布前准备:组内代码cr并跑通单测;
  • 运行npm run build 生成lib文件;
  • 修改包版本后发布

小程序封装方法包括

  • 小程序业务通用方法(string、time、url、 dataType、functions...)
  • 小程序的系统能力封装(webSocketstring、innerAudioContexttime、systemInfourl、授权信息)
  • 小程序通用业务方法封装(loginUtils、sourceToLeads)

小程序-Utils文档: 已有方法汇总

https://wiki.baijia.com/pages/viewpage.action?pageId=216185954