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

jy-on-version-change

v1.0.1

Published

```shell npm i jy-on-version-change --save ```

Downloads

5

Readme

安装

npm i jy-on-version-change --save

引入方式

import { onFeVersion } from 'jy-on-version-change'

onFeVersion() // 执行

onFeVersion 的参数说明

| 参数名称 | 参数描述 | 默认值 | | ----------- | -------------- | -------------------------------- | | webContext | 应用的二级目录 | / | | timeGap | 轮询的时间间隔(单位毫秒) | 3000 | | tipsMsg | 提示信息 | 检测到更新,是否要进行刷新升级? | | rebootTime | 取消按钮的重启时间(单位分钟) | 5 | | cancelBtnFn | 取消按钮的回调 | 关闭定时器 + 强刷新 | | submitBtnFn | 提交按钮的回调 | 关闭定时器 + 默认5分钟后,重新开启轮询 | | customizeDialog | 是否使用自定义弹窗提示 | 默认 false。选true的时候,confirm弹窗会换成html写的弹窗 | | debug | 是否开启调试模式 | 默认 false |

示例

import { onFeVersion } from 'jy-on-version-change'

onFeVersion()

或

onFeVersion({
    webContext: '/', // 应用的二级目录。非必填
    timeGap: 3000, // 轮询的时间间隔,单位毫秒。非必填
    tipsMsg: '检测到网站版本更新,是否要进行刷新升级?(注意:刷新会中断当前操作)', // 提示信息。非必填
    rebootTime: 1, // 取消后,n分钟后进行提示,单位分钟。非必填
    cancelBtnFn: null, // 取消按钮的回调。非必填
    submitBtnFn: null, // 提交按钮的回调。非必填
    customizeDialog: true, // 是否使用自定义弹窗提示。非必填
    debug: false, // 是否开启调试模式。非必填
})