{"repo":"typestack/class-transformer","free":true,"listed":false,"github":"https://github.com/typestack/class-transformer","clone":"git clone https://github.com/typestack/class-transformer.git","description":"Decorator-based transformation, serialization, and deserialization between objects and classes.","language":"TypeScript","stars":7334,"topics":["typescript","transformation","exposing-properties","exposing-getters"],"license":"MIT","category":"dev-tools","readme_excerpt":"class-transformer Its ES6 and Typescript era. Nowadays you are working with classes and constructor objects more than ever. Class-transformer allows you to transform plain object to some instance of class and versa. Also it allows to serialize / deserialize object based on criteria. This tool is super useful on both frontend and backend. Example how to use with angular 2 in plunker. Source code is available here. Table of contents - What is class-transformer - Installation - Node.js - Browser - Methods - plainToInstance - plainToClassFromExist - instanceToPlain - instanceToInstance - serialize - deserialize and deserializeArray - Enforcing type-safe instance - Working with nested objects - Providing more than one type option - Exposing getters and method return values - Exposing properties with different names - Skipping specific properties - Skipping depend of operation - Skipping all properties of the class - Skipping private properties, or some prefixed properties - Using groups to control excluded properties - Using versioning to control exposed and excluded properties - Сonverting date strings into Date objects - Working with arrays - Additional data transformation - Basic usage - Advanced usage - Other decorators - Working with generics - Implicit type conversion - How does it handle circular references? - Example with Angular2 - Samples - Release notes What is class-transformer⬆ In JavaScript there are two types of objects: - plain (literal) objects - class (constructo","default_branch":null,"files":null,"tree":[],"storefront":"/r/typestack","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/typestack/class-transformer/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}