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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zctj/zfgl-utils

v1.2.9

Published

1. aes

Readme

政府管理前端工具包

  1.  aes     
    
     	aes 加密
  2. ​ bus

     	基于vue的总线事件发布定于
  3. ​ config

    ​ 获取static/general.config.js 下的配置项

  4. ​ logger

    ​ 日子记录组件

  5. ​ objectUtils

    ​ 对象工具类

  6. ​ request

    ​ axios 异步请求工具类

  7. ​ requestConst

    ​ http 请求常量

  8. ​ session

    ​ 本地存储会话工具类

  9. ​ stringUtils

    ​ 字符串工具类

  10. ​ throttle

    ​ 并发控制工具类

  11. ​ validator

    ​ 数据校验工具类

  12. ​ webutils

    ​ 网络请求工具类

安装

npm install zfgl-utils  -save

使用

已导出内容

export {
    aes,
    bus,
    config,
    logger,
    objectUtils,
    request,
    requestConst,
    session,
    stringUtils,
    throttle,
    validator,
    webutils,
}

方式1

import {aes,webutils} from 'zfgl-utils'
...

aes.encryptAes();

方式2

import zfglUtils from 'zfgl-utils'
...

zfglUtils.aes.encryptAes()

API

  1. aes

    /**
       
     * AES 加密
     * @param {string} word  明文
     * @param {string} keyStr 密钥key 必需是11位16进制字符串,如果不传就用默认值
     * @param {string} ivStr  IV 必需是11位16进制,如果不传就用默认值
     * @return {string} 密文
       */
       function encryptAes(word, keyStr, ivStr) :string;

  2. ​ bus

     	参考vue 
  3. ​ config

    /**
       
     * 读取配置(/static/general.config.js),可以设置默认值
     * @param {string} key  参数
     * @param {*} defaultvalue  默认值,仅当不配置时获取
       */
       function getConfig(key, defaultvalue = undefined) :any ;
  4. ​ logger

    ​ 参考vuejs-logger 和console 类似

  5. ​ objectUtils

  6. ​ request

    /**
     * 简化form post 提交模式
     * @param {Object} config 配置。 method 和header-content-type 不用配了
     */
    service.formpost = function(config);
    /**
     * 简化json post 提交模式
     * @param {Object} config 配置。 method 和header-content-type 不用配了
     */
    service.bodypost = function(config);
    /**
    *未登录时如何处理。使用时,自己定义通过 
    */
    service.onNotLogin=function(){
        logger.info("还没有登录");
    }
       
    //////////使用示例///////////
       
    import {request} from 'zfgl-utils'
    request.onNotLogin=function(){
        //do something 
    }
       
    export default request;
  7. ​ requestConst

    ​ http 请求常量

  8. ​ session

    ​ 本地存储会话工具类

  9. ​ stringUtils

    ​ 字符串工具类

  10. ​ throttle

    ​ 并发控制工具类

  11. ​ validator

    ​ 数据校验工具类

  12. ​ webutils

    ​ 网络请求工具类