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

@helzady/zady

v4.0.0

Published

um logger simples e poderoso para Node.js, com saídas formatadas no console, tratamento de erros e utilitários focados no desenvolvedor.

Readme

Zady

Logger simples para Node.js com mensagens formatadas, cores ANSI, timer, debug condicional e utilitarios para melhorar a saida do console.

Instalacao

npm install @helzady/zady

Uso Rapido

import zady from "@helzady/zady";

zady.log("Mensagem comum");
zady.info("Servidor iniciado na porta 3000");
zady.warn("Variavel de ambiente nao definida");
zady.success("Conexao estabelecida");
zady.debug("Valor calculado: 42");
zady.divider();

const task = zady.timer("consulta ao banco");
// await db.query("SELECT ...");
task.stop("Consulta concluida");

O pacote exporta um objeto padrao com todas as funcoes disponiveis.

Saida

[14/06/2026 10:30] [LOG] Mensagem comum
[14/06/2026 10:30] [INFO] Servidor iniciado na porta 3000
[14/06/2026 10:30] [WARN] Variavel de ambiente nao definida
[14/06/2026 10:30] [SUCCESS] Conexao estabelecida
[14/06/2026 10:30] [DEBUG] Valor calculado: 42
----------------------------------------
[14/06/2026 10:30] [TIMER] Consulta concluida - 42.31ms

As mensagens usam codigos ANSI para colorir a saida em terminais compativeis.

API

| Funcao | Descricao | | --- | --- | | log(message) | Exibe uma mensagem com o prefixo LOG. | | info(message) | Exibe uma mensagem informativa com o prefixo INFO. | | warn(message) | Exibe um aviso com o prefixo WARN. | | success(message) | Exibe uma confirmacao com o prefixo SUCCESS. | | debug(message) | Exibe uma mensagem com o prefixo DEBUG somente quando DEBUG=true. | | error(message, options?) | Exibe um erro formatado e encerra o processo. | | divider(char?, length?) | Exibe uma linha divisoria no terminal. | | timer(label) | Cria um medidor de tempo e retorna um objeto com stop(label?). | | patchConsole(options?) | Substitui metodos do console nativo por versoes formatadas. |

Erros

error e uma funcao fatal: depois de imprimir a mensagem, ela encerra o processo com process.exit.

import zady from "@helzady/zady";

try {
  throw new Error("Falha ao conectar");
} catch (err) {
  zady.error("Nao foi possivel conectar ao banco", {
    code: 1,
    error: err,
    showStack: true,
    timestamp: true,
  });
}

Opcoes aceitas:

| Opcao | Tipo | Padrao | Descricao | | --- | --- | --- | --- | | code | number | 1 | Codigo usado ao encerrar o processo. | | prefix | string | "ERROR" | Prefixo exibido na mensagem. | | showStack | boolean | true | Exibe a stack quando error for uma instancia de Error. | | timestamp | boolean | true | Controla a exibicao de data e hora. | | error | unknown | undefined | Erro original usado para extrair stack e, quando existir, codigo. |

Campos extras tambem podem ser enviados no objeto de opcoes; eles serao impressos como metadados.

Debug

debug so imprime mensagens quando a variavel de ambiente DEBUG esta exatamente como true.

DEBUG=true node app.js
import zady from "@helzady/zady";

zady.debug("Esse log so aparece com DEBUG=true");

Timer

import zady from "@helzady/zady";

const task = zady.timer("upload");

// execute a operacao...

task.stop();
task.stop("Upload finalizado");

Divider

import zady from "@helzady/zady";

zady.divider();
zady.divider("=", 20);
zady.divider("*", 10);

Patch Do Console

patchConsole permite aplicar a formatacao do Zady aos metodos nativos do console.

import zady from "@helzady/zady";

zady.patchConsole();

console.log("mensagem comum");
console.warn("aviso");
console.error("erro");
console.info("info");
console.debug("debug");

Voce pode ativar apenas alguns metodos:

zady.patchConsole({
  log: true,
  warn: true,
  error: false,
  info: true,
  debug: true,
  requireDebugEnv: true,
});

| Opcao | Padrao | Descricao | | --- | --- | --- | | log | true | Formata console.log. | | warn | true | Formata console.warn. | | error | true | Formata console.error. | | info | true | Formata console.info. | | debug | true | Formata console.debug. | | requireDebugEnv | false | Quando true, console.debug so imprime com DEBUG=true. |

Estilos ANSI

O export padrao tambem inclui utilitarios de estilo em zady.style.

import zady from "@helzady/zady";

const { colors, bgColors, terminalStyle } = zady.style;

console.log(`${colors.cyan}Texto ciano${terminalStyle.reset}`);
console.log(`${bgColors.red}Fundo vermelho${terminalStyle.reset}`);
console.log(`${terminalStyle.negrito}Texto em negrito${terminalStyle.reset}`);

Valores disponiveis:

| Grupo | Chaves | | --- | --- | | colors | black, red, green, yellow, blue, magenta, cyan, white, gray | | bgColors | black, red, green, yellow, blue, magenta, cyan, white | | terminalStyle | reset, negrito, fraco, italico, sublinhado, riscado |

Desenvolvimento

npm run build
npm run check

Antes de publicar, o pacote espera os arquivos gerados em build.

Licenca

MIT - HelzadyDev