1.2.144 • Published 12 months ago

@brainstack/core v1.2.144

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@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.

1.2.144

12 months ago

1.2.143

1 year ago

1.2.142

1 year ago

1.2.141

1 year ago

1.2.134

1 year ago

1.2.136

1 year ago

1.2.135

1 year ago

1.2.138

1 year ago

1.2.137

1 year ago

1.2.139

1 year ago

1.2.140

1 year ago

1.2.133

1 year ago

1.2.130

1 year ago

1.2.132

1 year ago

1.2.131

1 year ago

1.2.129

1 year ago

1.2.127

1 year ago

1.2.123

1 year ago

1.2.122

1 year ago

1.2.125

1 year ago

1.2.124

1 year ago

1.2.126

1 year ago

1.2.121

1 year ago

1.2.118

1 year ago

1.2.120

1 year ago

1.2.119

1 year ago

1.2.112

1 year ago

1.2.111

1 year ago

1.2.114

1 year ago

1.2.113

1 year ago

1.2.116

1 year ago

1.2.115

1 year ago

1.2.117

1 year ago

1.2.110

1 year ago

1.2.109

1 year ago

1.2.101

1 year ago

1.2.100

1 year ago

1.2.103

1 year ago

1.2.102

1 year ago

1.2.105

1 year ago

1.2.104

1 year ago

1.2.107

1 year ago

1.2.106

1 year ago

1.2.108

1 year ago

1.2.98

1 year ago

1.2.99

1 year ago

1.2.96

1 year ago

1.2.97

1 year ago

1.2.94

1 year ago

1.2.95

1 year ago

1.2.69

2 years ago

1.2.71

2 years ago

1.2.42

2 years ago

1.2.45

2 years ago

1.2.46

2 years ago

1.2.43

2 years ago

1.2.44

2 years ago

1.2.49

2 years ago

1.2.47

2 years ago

1.2.48

2 years ago

1.2.52

2 years ago

1.2.53

2 years ago

1.2.50

2 years ago

1.2.51

2 years ago

1.2.56

2 years ago

1.2.57

2 years ago

1.2.54

2 years ago

1.2.55

2 years ago

1.2.58

2 years ago

1.2.59

2 years ago

1.2.60

2 years ago

1.2.61

2 years ago

1.2.41

2 years ago

1.2.40

2 years ago

1.2.39

2 years ago

1.2.38

2 years ago

1.2.37

2 years ago

1.2.35

2 years ago

1.2.34

2 years ago

1.2.33

2 years ago

1.2.32

2 years ago

1.2.30

2 years ago

1.2.26

2 years ago

1.2.25

2 years ago

1.2.24

2 years ago

1.2.23

2 years ago

1.2.22

2 years ago

1.2.21

2 years ago

1.2.20

2 years ago

1.2.19

2 years ago

1.2.18

2 years ago

1.2.17

2 years ago

1.2.16

2 years ago

1.2.15

2 years ago

1.2.14

2 years ago

1.2.13

2 years ago

1.2.12

2 years ago

1.2.11

2 years ago

1.2.10

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.4

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago