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

@zooey1184/log

v1.0.4

Published

#### 安装 ```sh yarn add @zooey1184/log # or npm i @zooey1184/log ```

Downloads

2

Readme

说明

安装

yarn add @zooey1184/log
# or
npm i @zooey1184/log

类型

默认定义类型 |类型|颜色| |--|--| |success|green| |warn|yellow| |error|red| |tip|cyan| |info|blue| |bold|加粗| |underline|下划线| |xxx(其他未定义)|white|

使用

// log === console.log   log.error ==> console.error
const log = require('@zooey1184/log')

log('this is normal log style')
// 如果拆分多个,则第一个会设置成有背景色的提示
log.success('success', 'this is success log style')
// 如果字符串中有{{}}  包裹  包裹内部使用颜色  其他为白色
log.tip('this is {{tip}} log style')
log.warn('warn', 'this is {{warn}} ', 'log style')
log.xx('xxxx', 'not defined this function or property show this default style')
// bold | underline
log.bold('this is bold style')

// hex 使用hex 函数 颜色为hex|rgb 样式
log.hex('#d43f33')('this is hex style')
log.hex('rgb(88,189,144)')(' rgb ','this is rgb style\n')

// 除此之外  你还可以自定义 或者覆盖原有样式
log.good = '#CD0074'
log.good(' GOOD ', 'this is {{good}} style')
// 支持rgb
log.bad = 'rgb(120,189,144)'
log.bad('this is bad style')

example

git 传送门 npm 传送门

不支持 log.rgb(...)(xxx) 你可以使用 log.hex('rgb(88,189,144)')