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

@ostore/utils

v1.3.2

Published

一个常用的工具函数库

Downloads

2

Readme

文档地址

版本更新

v1.3.2 2024-01-24

增加

  • format补充格式化函数

    • formatFileSize文件大小单位格式化
  • assets补充资源函数

    • getBase64ImageSize获取Base64编码图片文件大小
    • compressImage图片压缩

v1.3.1 2024-01-11

增加

  • date补充延迟函数
    • sleep同步延迟
    • asyncSleep异步延迟

v1.3.0 2024-01-04

增加

  • date添加时间模块

    • isDate 获取日期对象
    • isLeapYear 是否闰年
    • getDaysOfMonth 获取月份天数
    • getBeginDayOfMonth 获取月份开始
    • getMonthInfo 获取月份信息
    • getMonthDays 获取日历月份视图信息
  • assets添加资源模块

    • downloadFile下载文件
    • dataURItoBlobbase64转二进制
    • imageToBase64图像转Base64
    • getImageSize获取图片尺寸
  • storage补充缓存函数

    • setLocalStorage 存储 localStorage
    • getLocalStorage 获取 localStorage
    • setSessionStorage 存储 sessionStorage
    • getSessionStorage 获取 sessionStorage
  • format添加格式化模块

    • numberWithCommas数字千分位分割
    • formatBankCardNumber格式化银行卡号
  • math添加数学计算模块

    • compute四则运算
  • DOM添加DOM模块

    • getParentNode获取指定class的祖先元素
    • requestFullscreen指定dom元素全屏
    • exitFullScreen退出全屏
  • 颜色值添加颜色值模块

    • rgbaRegex 匹配rgba或rgb颜色
    • hexRegex 匹配十六进制颜色
    • hslRegex 匹配hsl颜色
    • hslaRegex 匹配hsla颜色
    • rgbaToHex rgba转十六进制
    • hexToRgba 十六进制转rgba
    • rgbaToHsl rgba转hsl
    • hslToRgb hsl转rgb
    • hslaToRgba hsla转rgba
  • utils补充工具函数

    • copyAsync复制
    • debounce防抖函数
    • throttle节流函数

删除

  • utils其他函数中移除
    • requestFullscreen 指定 dom 元素全屏
    • exitFullScreen 退出全屏
  • file文件模块移除

v1.0.4 2023-12-18

  • 修复 README

v1.0.3 2023-12-18

  • utils添加工具模块
    • getDataType 获取数据类型
    • getParentNode 递归获取指定 class 的祖先元素
    • hasNotNullValue 判断对象是否至少有一项值
    • hasNullValue 判断对象是否有空值
    • uniqueByKey 根据指定 key 的值,对对象数组进行去重
    • requestFullscreen 指定 dom 元素全屏
    • exitFullScreen 退出全屏
    • copy 复制函数
  • file添加文件模块
    • dataURItoBlob 将 base64 转换为字符串中的原始二进制数据
    • downloadFile 下载文件
  • storage添加缓存模块
    • getCookies 获取 cookie
  • url添加路由模块
    • getUrlParams 获取 url 参数
    • setSearchParams 修改 href
    • packUrlParams 组装 url 参数

v1.0.2 2023-12-17

  • 添加 ts
  • 添加部署脚本 deploy.sh

v1.0.1 2023-12-17

  • 添加 rollup 打包

v1.0.0 2023-12-17

  • 初始化测试 scope 发布