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

mozlite

v0.0.38

Published

UI for Mozlite framework.

Readme

本框架用于Mozlite前端开发

本框架集成了eonasdan-bootstrap-datetimepicker,moment,依赖于jQuery,bootstrap,popper.jsfontawesome,并对jQuery进行扩展,以及一些辅助方法。

NPM&Taobao

原始地址:

npm config set registry http://registry.npmjs.org

淘宝镜像

npm config set registry https://registry.npm.taobao.org

API文档

模块导出为"Mozlite",在前端UI中可以直接调用,通过Script标签引入库。

<link href="~/css/font-awesome.min.css" rel="stylesheet"/>
<link href="~/css/bootstrap.min.css" rel="stylesheet"/>
<link href="~/css/mozlite.min.css" rel="stylesheet"/>
<script type="text/javascript" src="~/js/jQuery.min.js"></script>
<script type="text/javascript" src="~/js/popper.min.js"></script>
<script type="text/javascript" src="~/js/bootstrap.min.js"></script>
<script type="text/javascript" src="~/js/mozlite.min.js"></script>

Mozlite.alert(msg: string | StatusMessage, type?: StatusType, func?: Function)

使用Bootstrap的Modal,弹窗显示一条信息。

  • msg:string | StatusMessage:表示消息字符串,或者消息实体类对象;
    1. StatusMessage实例对象,包含如下结构:
    /** 
     * 消息接口。
    */
    interface StatusMessage {
        /**消息类型。 */
        type: StatusType;
        /**消息字符串。 */
        message: string;
        /**其他实例对象。 */
        data?: any;
    }
    1. StatusType枚举:
    /**报警类型 */
    enum StatusType {
        /**成功。 */
        Success,
        /**消息。 */
        Info,
        /**警告。 */
        Warning,
        /**错误。 */
        Danger,
    }
  • type?:StatusType:展示的类型枚举;
  • func?:Function:回调函数,点击确定后回调的函数。

Mozlite.ajax(url: string, data: object, success?: Function, error?: Function)

执行ajax的Post提交功能,参数如下:

  • url:string:提交的地址;
  • data:object:发送的对象;
  • success?:Function:成功后执行的方法;
  • error?:Function:失败后执行的方法。