useful-typescript-functions
v4.6.1
Published
Adds useful functions written in Typescript
Maintainers
Readme
Useful TypeScript Functions
A dependency-free collection of useful functions for applications in TypeScript. (Actually, you need some peer libraries if you use some of the functions). Written in Typescript.
- Objects for working with objects
- Functions run asynchronous functions one after each other
- Logger a structured log file generator which can easily be tested
- Server to simplify creation of express.js servers and routers
- Files to help handle files, especially image previews
- Mailer for sending html templated emails easily
- Streams for easier handling of streams of data
Upgrade from version 4.4.0
Starting with version 4.5.0, the Files module uses the yaml package instead of yamljs for YAML parsing. If you use the readYAML() or readConfig() functions, you need to:
- Replace
yamljswithyamlin your dependencies:npm uninstall yamljs && npm install yaml - No code changes are required - the API remains the same
Upgrade from version 3
Version 4 of useful-typescript-functions only works with ESM.
Upgrade from version 2
There are some breaking changes of version 3.
- If you use
Server, you should have a look into the this upgrade info. - Previously deprecated functions
flattenObject()andinflateObject()are now removed. You now need to move toflattenandinflate()now. - Instead of using
CSVLoggerto read and write CSV files, you should now useStreamsmodule and its CSV related transforms. - The
CSVLoggermodule is now removed in favour of usingLoggerand its functioncreateCSVTransport(). Read about that here
