Are there any packages available for mapping two object in typescript I.E Automapper? I found a couple of packages but they don't have enough document for implementation.
AutoMapper (TypeScript) is an object-object mapper by convention. When two objects' models are conventionally matching, AutoMapper can map the two objects with almost zero mapping configuration.
AutoMapper is used whenever there are many data properties for objects, and we need to map them between the object of source class to the object of destination class, Along with the knowledge of data structure and algorithms, a developer is required to have excellent development skills as well.
AutoMapper is one of the popular object-object mapping libraries with over 296 million NuGet package downloads. It was first published in 2011 and its usage is growing ever since. Mapster is an emerging alternative to AutoMapper which was first published in 2015 and has over 7.4 million NuGet package downloads.
Automapper is slower when mapping a single object and collections but there is one exception. Automapper is considerably faster when mapping a List<T> of objects on . NET Core (It's still slower on full .
Here are a couple I am aware of:
There is also a good discussion about this at https://www.reddit.com/r/javascript/comments/4tg69t/question_typescript_auto_mapping/ that might be of interest.
have you looked at
Disclaimer I'm the author, I wrote it as I wanted some more of the advanced options (note it flexible with how classes are detailed and mapped)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With