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

@brainstack/core

v1.2.144

Published

Brainstack Core Packages

Downloads

198

Readme

@brainstack/core

A collection of micro packages designed to streamline and enhance the development of modular applications.

Installation

You can install the package using npm:

npm install @brainstack/core

Packages Included

The @brainstack/core package is a bundle that includes the following micro packages, each tailored to address specific aspects of application development:

  • @brainstack/inject: A lightweight dependency injection library for JavaScript and TypeScript. Simplify the management of object dependencies and promote code reusability.

  • @brainstack/log: A micro logger package that offers a simple and efficient way to manage logs and improve debugging processes.

  • @brainstack/hub: A micro pub/sub package that facilitates seamless communication between different parts of your application, enabling efficient event-based architectures.

  • @brainstack/state: A micro state management library that empowers you to handle application state effortlessly, making it ideal for managing complex UI components or global application data.

  • @brainstack/store: A package that combines @brainstack/hub and @brainstack/state unlocking state management with event handling, providing a convenient solution for managing application state and responding to state changes using event-driven programming.

  • @brainstack/config: A micro config manager package that lets you manage configuration settings efficiently and flexibly, ensuring smooth application setup and behavior.

  • @brainstack/auth: The Brainstack Auth SDK is a powerful tool for managing user authentication in various applications. It provides a unified interface to interact with authentication methods, abstracting the underlying complexities and offering a streamlined API.

  • @brainstack/crud: A micro CRUD package that provides a convenient way to perform Create, Read, Update, and Delete operations on data sources, making data manipulation straightforward.

Usage

The @brainstack/core package serves as a convenient entry point to access and utilize the included micro packages in your application.

Importing

To use the various micro packages, simply import them from @brainstack/core. For example:

import { inject, Dependency } from '@brainstack/core';
import { createLogger } from '@brainstack/core';
import { createHub } from '@brainstack/core';
// Import other packages as needed

Example Use Case

Imagine you're building a sophisticated web application that requires efficient communication between components, detailed logging, and centralized state management. Instead of manually integrating separate libraries for these tasks, you can leverage the power of @brainstack/core.

import { createLogger, createHub, createStateManager } from '@brainstack/core';

// Create a logger instance
const logger = createLogger();

// Create a hub for event communication
const hub = createHub();

// Create a state manager for managing application state
const stateManager = createStateManager();

// Now you can use these instances throughout your application
// ... other code ...

Use Cases

The @brainstack/core package is ideal for:

  • Building modular applications that follow best practices for dependency management, logging, and communication.
  • Streamlining development by providing simple and focused solutions for common challenges.
  • Simplifying the setup and management of application-wide configuration and state.
  • Promoting code reusability and maintainability through encapsulated logic and agents.
  • Ensuring consistent and efficient data manipulation with the CRUD package.

Contributing

Contributions are welcome! If you would like to contribute to this module, please follow these guidelines:

Fork the repository
Create a new branch for your changes
Make your changes and commit them with descriptive commit messages
Push your changes to your fork
Submit a pull request

License

This module is released under the MIT License.