Socket
Book a DemoInstallSign in
Socket

@monesidn/typescript-utils

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@monesidn/typescript-utils

A collection of small utilities that I use almost everyday in TS projects.

2.0.4
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

@monesidn/typescript-utils

A collection of small utilities that I use almost everyday in TS projects. The best way to explore the project is checking the generated typedoc documentation.

ESM

Since version 2.0.0 the project is using ESM as package system. This makes tree shaking work out of the box with no further issue.

API

You can explore the generated API definition here: https://monesidn.github.io/typescript-utils

Most important pieces

While there are many small utilities in this library there a few larger ones that are worth documenting here.

LoggerManager

This is a simple yet powerful logging utility. I created it because winston logger for too complicated to be used in the browser and I did not need advanced features. If you need a complex API do not rely on this, but if you need a quick way to handle logs with the ability of disabling selectively you'll find it useful.

For more information see: https://monesidn.github.io/typescript-utils/classes/logger_LoggerManager.LoggerManagerClass.html

TaskRunner

Ever had the need of running an unknown number of async task concurrently? I got you covered. The TaskRunner class does exactly this abstracting away all the complexity of orchestrating the workers and the error handling.

For more information see: https://monesidn.github.io/typescript-utils/classes/tasks_TaskRunner.default.html

Events

I don't know you, but I'm tired of node "event" package. How it interacts with typescript and the fact that is not available in browser (without an external library naturally) is terrible. Well I decided to come up with my own event API loosely based on the EventEmitter class defined by Angular 2+.

For more information see: https://monesidn.github.io/typescript-utils/classes/events_EventsSource.default.html

delay

The most used utility, at least for me! See https://monesidn.github.io/typescript-utils/functions/async_delay.default.html

FAQs

Package last updated on 10 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.