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

@jiess/utils

v3.3.2

Published

本库集中了常用前端工具;以及中介者Midder

Downloads

245

Readme

核心库 @jiess/utils

版本迭代记录

2.3.x

追加Midder模块

  • 原Midder模块位于@jiess/plus中,由于其与@jiess/plus内部其他模块间关联较弱,
  • 故将其彻底解耦,剥离出来放到@jiess/plus中,并将其开源

优化ajax模块

  • 当type非常用类型的字符串时,直接以type作为content-type的值

优化基础库安装插件

  • 可以手动指定基础库的安装目录,默认时程序运行目录的src/.jiess目录

2.4.x

  • 对node环境插件打包处理
  • 追加Taro环境的基础库安装插件

JiessBasePlugin1

可用于 taro 环境使用

// taro 项目:
// @/config/index.js

plugins: [
	[
		'@jiess/utils/lib-node/JiessBasePlugin1',
		{
			basePath: __dirname,
			output: '../src/.jiess'
		}
	]
]

无法延迟项目启动,因此首次加载时,基础库可能未及时拉取而报错,重启即可

JiessBasePlugin2

可用于 vite 环境使用

// vue-vite 项目:
// vite.config.js

plugins: [
	JiessBasePlugin2({
		basePath: __dirname,
		output: './src/.jiess'
	})
]

项目会等待基础库拉取完毕后,继续执行启动过程

JiessBasePlugin3

可用于 umi,vue2-uni 环境使用

// reat-umi 项目:
// @/config/config.js

chainWebpack(memo) {
	memo.plugin('JiessBasePlugin').use(JiessBasePlugin3, [{
		basePath: __dirname,
		output: '../src/.jiess'
	}]);
}

无法延迟项目启动,因此首次加载时,基础库可能未及时拉取而报错,重启即可

不同脚手架环境的插件的使用形式有差异,以上环境为验证过的环境 如有其他脚手架环境,可根据实际情况择其引入

2.4.3

  • 追加responseType属性,用于控制fetch条件下response的调用,如接口返回流,则response.blob()
  • 追加returnUrl属性,常用于URL的构建,无需请求接口,如模板文件下载
  • 将fetch条件下的response和ajax下的xhr暴露出来,用于获取响应头等
  • 对工具库toString工具,进一步完善功能

2.4.4

  • 工具库提供diff函数,用于判定两个数据是否全等

2.4.5

  • HttpRequest模式下对流数据的处理

2.4.6

  • http拦截器对异步函数的支持

2.4.7

对JiessBasePlugin的规范化,支持以下环境的Jiess基础库插件安装

  • JiessBasePluginNuxt
  • JiessBasePluginUmi
  • JiessBasePluginVite
  • JiessBasePluginWebpack

2.4.8

  • 对JiessBasePluginNuxt的优化

3.0.0

  • 将后端资源请求和配套的Loading工具独立成 @jiess/http 库
  • 对工具库中dateFormat中过时正则和方法的替换方案
  • 对file工具的系统性优化,更新为jiess-file文件
  • 对插件工具的系统性优化

3.0.1

  • 依赖download-git-repo模块,解决按照后缺少依赖的问题

3.1.0

  • 大的目录结构调整
  • 对tools工具库,midder中介者增加多环境支持
  • 每个库分别有以下三种后缀,根据实际应用场景选择
.js // production无babel
.babel.js // production有babel
.babel.full.js // development有babel

3.1.1

  • 重新将工具库在cdn下的名称改为JiessTools
  • 重新将中介库在cdn下的名称改为JiessMidder

3.1.2

  • 在jiess-base克隆完成后,根据自定环境重置入口文件

3.1.3

  • 增加JiessResolver

3.1.4

  • package.json导出调整

3.1.5

  • dateFormat导出

3.1.6

  • dateFormat优化

3.1.7

  • 打包的统一处理

3.2.0

  • 进一步拆分,将node部分拆分为@jiess/tools

3.2.1

  • 升级clone工具函数,克隆过程中移除参考对象中的自循环属性对象

3.2.2

  • 对象的特殊属性(iscomponent)排除深拷贝
  • 升级clone工具函数,对特殊属性进行排除,如组件对象等

3.2.3

  • baseDebounce1对node环境的兼容

3.3.0

  • identify工具判断多种类型时,使用数组提供多个类型,取代原来的 | 分割

3.3.2

  • 名称统一,所有的工具方法导出均携带$作为前缀