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

weiyao-jasmine-utils

v1.0.3

Published

- js常用工具 #### 方法

Downloads

1

Readme

工具库

  • js常用工具

方法

  • addEventListener : 事件委托
  • apply : this指向
  • bind : this指向
  • call : this指向
  • cancat : 数组连接
  • chunk : 数组分块
  • debounce : 函数防抖
  • throttle : 函数节流
  • deepCopy : 深拷贝
  • ShallowCopy : 浅拷贝
  • drop : 删除数组中左边部分
  • dropRight : 删除数组中右边部分
  • eventBus: 事件总线
  • every : 数组有一个不满足条件就为false
  • some : 数组有一个满足条件就为true
  • filter : 数组过滤器
  • find : 查找数组中符合条件的第一个元素
  • findIndex :查找数组中符合条件的第一个元素的下标index
  • flat : 数组扁平化
  • map : 数组中的元素为原始数组元素调用函数处理后的值
  • mergeObject : 合并对象
  • myInstanceOf : 判断是否是一个对象
  • newInstance : 创建新的实例
  • PubSub : 发布/订阅
  • pull :删除原数组中与value相同的元素, 返回所有删除元素的数组
  • reduce : reduce 方法相同
  • reverseString : 字符串倒序: reverseString(str) 生成一个倒序的字符串
  • palindrome : palindrome
  • truncate :截取字符串: truncate(str, num) 如果字符串的长度超过了num, 截取前面num长度部分, 并以...结束
  • slice: 截取数组
  • unique : 数组去重

作者

@author:weiyao-jasmine @email:[email protected]