@daiso-tech/core

0.35.4 • Public • Published

@daiso-tech/core

npm version NPM Downloads Static Badge ES Modules License

A modular, framework-agnostic library providing essential components for modern web applications. Stop reinventing the wheel - focus on building your application while the library handles the core functionalities.

✨ Features

Current Features

  • Immutable Collections:

    • IterableCollection - Simplifies work with Iterable
    • ListCollection - Simplifies work with Array
    • AsyncIterableCollection - Simplifies work with AsyncIterable
  • Middleware System

    • Agnostic middlewares applicable to any async/sync functions.
      • fallback: Automatic recovery with default values on errors
      • observe: Monitor function execution and performance
      • retry: Smart retries with multiple backoff policies:
        • constantBackoffPolicy
        • exponentialBackoffPolicy
        • linearBackoffPolicy
        • polynomialBackoffPolicy
      • sequentialHedging: Runs fallbacks sequentially if the primary function fails, ensuring graceful failure handling.
      • concurrentHedging: Executes the primary function alongside fallbacks concurrently, returning the first successful result and aborting all remaining operations.
      • timeout: Guaranteed execution time limits
  • LazyPromise:

    • Executes only when awaited
    • With middleware support
  • Pluggable Components:

    • Cache with adapter support
    • Lock with adapter support
    • EventBus with adapter support
    • Serde (serializer, deserializer) adapters

Planned Features

  • Query bus
  • Command bus
  • Semaphore component
  • SharedLock (ReaderWriterLock)
  • RateLimiter
  • CircuitBreaker
  • MessageQueue
  • TaskScheduler
  • Notification system
  • Abstract file system

🚀 Installation

npm install @daiso-tech/core

Inspired By

Built with ideas from:

Package Sidebar

Install

npm i @daiso-tech/core

Weekly Downloads

136

Version

0.35.4

License

Apache-2.0

Unpacked Size

1.68 MB

Total Files

870

Last publish

Collaborators

  • yousif.khalil.abdulkarim