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

ty-interface-log

v1.0.3

Published

前端接口日志

Downloads

2

Readme

INTERFACE-LOG

功能描述:
   1.捕获特定axios实例的接口请求信息 时间+状态+时长
   2.catch指定接口返回的字段是否为空值
   3.接口时长超时警告和异常警告
   4.接口状态时长控制配置

注册使用

npm install ty-interface-log -d
import interfaceLog from 'ty-interface-log'

1.实例化interfaceLog 并 通过Api .use完成参数配置
2.use完成后 直接通过实例上面的Api .showLogPop  来唤醒接口日志ui窗口

ps:use挂载到全局环境 即可位置通用

参数

    interfaceLog.use(axiosInstance,{//配置项
        customStatusKey:'code',//服务端状值key
        customSuccessCode:0,//服务端约定的成功状态值
        dataRoot:'data',//服务端完整数据对象,可以通过正常的对象访问方式 (data.data)
        dataBase:'data',//数据对象 基于dataRoot
        outTime:5000,//时长红色警告值 毫秒
        warningTime:2000,//时长黄色警告值
        emptyTypes:["null",undefined,"{}","[]"],//默认空值校验类型
        logNum:100,//输出总条数
        catchAllerror:true,//是否捕获所有错误,如果是ture则不需要设置单独的接口监听
        logCatchMinTime:200,//最小捕获请求时长 毫秒
        filterUrl:['FileOperate'],//需要被过滤的接口名称
        switch:true,
    });//接口日志

版本

    1.0.1
        1.read完善补充
    1.0.2
        1.bug修复
    1.0.3
        1.bug修复