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

react-debulog

v1.0.1

Published

react-debulog - A flexible React logging library. Customize and style logs for efficient debugging in your React applications.

Downloads

1

Readme

react-debulog

react-debulog is a versatile and customizable logging library for React applications, allowing you to enhance your debugging and logging capabilities with ease.

Installation

To install react-debulog, you can use npm or yarn:

npm install react-debulog

or

yarn add react-debulog

Usage

Import the library and its functions into your React component file:

import { useEffect } from 'react';
import {
  logError,
  logInfo,
  logSuccess,
  logWarning,
  logCustom,
} from './debulog';

function App() {
  // Examples of logs with different styles
  useEffect(() => {
    logCustom({
      text: 'Here you can pass an object with the text and style you want',
      style: {
        color: 'white',
        backgroundColor: 'blue',
        padding: '10px',
        fontSize: '20px',
      },
      // Here you can pass an object or a string, and it will be displayed in the console
    });

    // The logs below are the defaults, but you can pass the text and style you want
    logSuccess(
      {
        text: 'Log with success!',
        style: {
          color: 'white',
          backgroundColor: 'green',
          padding: '10px',
          fontSize: '20px',
        },
      }
      // Here you can pass an object or a string, and it will be displayed in the console
    );
    logSuccess('Log with success!');
    logWarning('Log with warning!');
    logError('Log with error!');
    logInfo('Log with info!');
  }, []);

  return <></>;

  export default App;
}

Customization

You can customize the styles of the logs by passing the styles you want in the style object.

export interface StylesPropsDebulog {
  color?: string;
  border?: string;
  padding?: string;
  margin?: string;
  fontSize?: string;
  fontWeight?: string;
  fontStyle?: string;
  textDecoration?: string;
  backgroundColor?: string;
  [key: string]: string | undefined;
}

// example
logSuccess({
  text: 'Log with success!',
  style: {
    color: 'white',
    backgroundColor: 'green',
    padding: '10px',
    fontSize: '20px',
    // Here you can pass the styles you want
  },
});

Preview

Preview Debulog

Contribution Guide

Welcome to the project! We're delighted that you want to contribute. This guide will walk you through how to do so effectively.

Author and Contributors

This project is maintained by Gustavo Bacellar.

If you would like to contribute to this project, please follow the Contribution Guidelines.

Contribution Guidelines

  1. Fork the Repository

    Click the "Fork" button in the top right corner of this page to create a copy of the repository in your own GitHub account.

  2. Clone the Repository

    Clone your fork locally to your machine:

    git clone https://github.com/gustavobacellarladeira/react-debulog.git
    ``

Support Our Project

Why Donate?

Our project is powered by the generous support of people like you. Your donations help us continue our mission and make ongoing improvements.

How You Can Help

  • Click the "Donate" button above to make a quick and secure donation.
  • Consider a monthly donation to support the project continuously.
  • Share our project with friends and family to expand our reach.

Your Support Makes a Difference

Every donation, no matter how small, makes a significant impact on our project. We deeply appreciate your ongoing support.

Support Now

License

This project is licensed under the MIT License - see the LICENSE file for details.