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

weex-logger

v1.1.26

Published

Weex-logger is a logging middleware that implements a console.log - like effect and facilitates display of interactive data in weex.

Downloads

15

Readme

Weex-logger is a logging middleware that implements a console.log - like effect and facilitates display of interactive data in weex.

Import the access middleware, and invoke the start event, define the output variables, then you can use the add event to increase information in the current page and all sub pages. Each row information is separated and convenient to view.

Thanks to Zaaksam's technology sharing!

weex-logger是一个日志记录中间件,实现类似console.log的效果,方便在weex中显示交互数据。

导入访中间件,并调用start事件,定义好输出的变量,即可在当前页面及所有子页面中使用add事件增加信息,每行信息分开,方便查看。

感谢Zaaksam的技术分享!

Install

npm install weex-logger --save

Usage


import logger from "weex-logger";

Options

  • start 开始记录 start record
  • add 增加记录 added record
  • content 全部记录内容 all records
  • stop 停止记录 stop record

Example


    logger.add("no start");

    logger.start(content => {
      this.log = content;
    });
    logger.add("start1");
    logger.add("start2");

    let content = logger.content;
    logger.add("logger content:" + JSON.stringify(content));

    logger.stop();
    logger.add("stop1");
    logger.add("stop2");

    logger.start(content => {
      this.log = content;
    });
    logger.add("restart1");
    logger.add("restart2");

Result

-----------run-------------
start1
start2
logger content:"start1
\r\nstart2
" restart1
restart2
-----------END run-------------

Other

生成的JS文件在dist目录中,可使用JS调用,调用方式雷同,不再重复。

The generated JS file can be called in the dist directory using the JS call, and the call is identical and no longer repeats.

Licences

[MIT]