Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/monesidn/typescript-utils
https://github.com/monesidn/typescript-utils
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/monesidn/typescript-utils
- Owner: monesidn
- License: mit
- Created: 2021-11-24T17:04:27.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-10T14:28:40.000Z (10 months ago)
- Last Synced: 2024-01-11T10:55:40.384Z (10 months ago)
- Language: TypeScript
- Size: 1.94 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# @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