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

utils-nxhl-sz

v0.1.13

Published

nxhl's util function library

Downloads

18

Readme

utils-nxhl-sz

通用工具函数

平台兼容性

全平台

v2、v3、uniapp(全端)、pc、小程序等 js 项目

支持 ts

上传方法

  1. npm run build
  2. 手动修改 package.json 中 version 版本号
  3. npm publish

前言

项目中我们常常需要编写一些函数,用来处理 一些简单的逻辑,不同的项目中用到的工具函数大部门都是一样的,所以每个项目都要重复的添加这些函数,为了减少这部分重复劳动,我们可以创建一个工具函数库将复用率比较高的函数添加到这个库里面,还可以上传到 npm,简化添加使用的步骤。 1.使用方法: 1.1 安装工具库:

npm i utils-nxhl-sz --save
cnpm i utils-nxhl-sz --save
yarn add utils-nxhl-sz

1.2 业务组件使用方法 // 按需引入到业务代码,减少前端工程构建体积

import { dayOfYear } from "utils-nxhl-sz";
const a = dayOfYear("2023-05-25"); // 返回 145,今天是今年的第145天

1.3 查看是否有新版本

npm info utils-nxhl-sz versions(查看所有版本)
npm view utils-nxhl-sz version(查看当前最新版本)

1.4 升级工具库到最新版本

npm install utils-nxhl-sz@latest -D

参考文档

【腾讯文档】前端工具库 UTILS https://docs.qq.com/doc/DQ0xhTFNycUx0TWlL