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

gentleman-signals-state-manager

v0.1.0

Published

## English 🎩

Downloads

2

Readme

🚀 gentleman-signals-state-manager: ¡Manejando señales de estado como un caballero! 🎩

English 🎩

Description

GManagerService is at the heart of the gentleman-signals-state-manager library, a state signal management service in Angular that is not only classy, but super powerful!

Why use gentleman-signals-state-manager instead of 'raw' signals?

  • 🎯 Framework-Agnostic: Designed to work with Angular, but thanks to its agnostic design, it could be easily adapted for any frontend library or framework.

  • 💼 Simplified Signal Management: Forget about manually handling signals and let GManagerService take care of everything. Add, update, and get signals with ease.

  • 🛡️ Robust: Handles errors automatically, protecting your app against non-existent or duplicate signals.

  • 🚀 Optimized Performance: By managing signals efficiently, GManagerService helps keep your app fast and agile.

Recommended Usage

To start using gentleman-signals-state-manager in your own project, follow the format shown below:

// Import the necessary
import { Inject, Injectable } from "@angular/core";
import { GENTLEMAN_DEFAULT_STATE, GManagerService } from "gentleman-signals-state-manager";

// Define your own service
@Injectable({
  providedIn: 'root',
})
export class SignalsManagerService<T> {
  signalsManager: GManagerService<T>;

  // Inject the initial state
  constructor(@Inject(GENTLEMAN_DEFAULT_STATE) defaultState: T) {
    this.signalsManager = new GManagerService(defaultState);
  }
}

And then, in your main component:

// Provide your service and the initial state
@Component({
  selector: 'app-root',
  standalone: true,
  imports: [
    CommonModule,
    RouterOutlet,
    ComponentitoComponent,
    Componentito2Component,
  ],
  providers: [
    SignalsManagerService<AppSignalState>,
    { provide: GENTLEMAN_DEFAULT_STATE, useValue: emptyAppSignalState },
  ],
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent {
  title = 'Gentleman Signals State Manager';
}

For a complete example of how to use gentleman-signals-state-manager, check out the "example" folder in our GitHub repository.

To install gentleman-signals-state-manager in your project, head over to the package page on npm.

You're all set to start managing state signals like a true gentleman! 🎩🚀

English 🎩

Descripción

GManagerService es el corazón de la librería gentleman-signals-state-manager, un servicio de manejo de señales de estado en Angular que no solo es elegante, ¡sino que también es super potente!

¿Por qué usar gentleman-signals-state-manager en lugar de señales 'crudas'?

  • 🎯 Agnóstico a los frameworks: Diseñado para funcionar con Angular, pero gracias a su diseño agnóstico, podría ser fácilmente adaptado para cualquier librería o framework de frontend.

  • 💼 Manejo de señales simplificado: Olvídate del manejo manual de las señales y deja que GManagerService se ocupe de todo. Añade, actualiza y obtén señales con facilidad.

  • 🛡️ Robusto: Maneja errores automáticamente, protegiendo tu aplicación contra señales inexistentes o duplicadas.

  • 🚀 Rendimiento optimizado: Al manejar las señales de manera eficiente, GManagerService ayuda a mantener tu aplicación rápida y ágil.

Uso Recomendado

Para comenzar a utilizar gentleman-signals-state-manager en tu propio proyecto, sigue el formato que se muestra a continuación:

// Importa lo necesario
import { Inject, Injectable } from "@angular/core";
import { GENTLEMAN_DEFAULT_STATE, GManagerService } from "gentleman-signals-state-manager";

// Define tu propio servicio
@Injectable({
  providedIn: 'root',
})
export class SignalsManagerService<T> {
  signalsManager: GManagerService<T>;

  // Inyecta el estado inicial
  constructor(@Inject(GENTLEMAN_DEFAULT_STATE) defaultState: T) {
    this.signalsManager = new GManagerService(defaultState);
  }
}

Y luego, en tu componente principal:

// Proporciona tu servicio y el estado inicial
@Component({
  selector: 'app-root',
  standalone: true,
  imports: [
    CommonModule,
    RouterOutlet,
    ComponentitoComponent,
    Componentito2Component,
  ],
  providers: [
    SignalsManagerService<AppSignalState>,
    { provide: GENTLEMAN_DEFAULT_STATE, useValue: emptyAppSignalState },
  ],
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent {
  title = 'Gentleman Signals State Manager';
}

Para un ejemplo completo de cómo utilizar gentleman-signals-state-manager, visita la carpeta "example" en nuestro repositorio de GitHub.

Para instalar gentleman-signals-state-manager en tu proyecto, dirígete a la página del paquete en npm.

¡Estás listo para comenzar a manejar señales de estado como un verdadero caballero! 🎩🚀