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

web-logging

v0.1.7

Published

web-logging 日志记录

Readme

web-logging 日志记录

web-logging是一个纯JavaScript编写的 前端日志管理。主要是为了解决现在使用webpack打包后的项目导致的 错误信息不易追踪的问题。web-logging日志存储为近30天的记录。本庫依賴 amx-indexeddb。

支持Amx技术:

  • IndexedDB - IndexedDB 是一个用于在浏览器中储存较大数据结构的 Web API, 并提供索引功能以实现高性能查找. 像其他基于 SQL 的 关系型数据库管理系统 (RDBMS) 一样, IndexedDB 是一个事务型的数据库系统. 然而, 它是使用 JavaScript 对象而非列数固定的表格来储存数据的.

github : https://github.com/SenLiangpi/web-logging

用法

安装 npm i web-logging 在所需点引入 web-logging

  //web-logging 供三个方法 webLoggingIn 初始化 webLoggingWrite 写入 webLoggingList读出
  import { webLoggingIn, webLoggingWrite, webLoggingList } from 'web-logging'

API

webLoggingIn(Boolean)

  //webLogging會在body中創建dom 以提供 logging 日志記錄的查看 ,傳入參數 true 或 false ,true為允許 將渲染dom false 為不允許 將不會渲染
  webLoggingIn(Boolean)

webLoggingWrite(json)

/**
   * { 
   * logName: '用于标识日志,例如请求日志、标准错误、标准输出等。',
   * remarks: '备注'
   * }
   */
  webLoggingWrite({logName:'业务逻辑',remarks: '外部引入方法'})

webLoggingList(startDate,endDate)

//startDate 开始时间 endDate结束时间 时间段查询 如果不传值则查询全部
//如果传开始时间 就查询开始时间之后所有的数据 如果传结束时间就查询结束时间之后记录的所有数据 已对应设备的时间为准
  webLoggingList(startDate,endDate).then((result) => {
    console.log(result)
  }).catch((err) => {
    console.log(err)
  });

皮皮研究所出品