mapper-factory 1.0.15 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +30 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,11 +6,15 @@ Work well on data structure and after enjoy the coding process :)
6
6
  ## Installation
7
7
  To install the package, you can use npm by running the following command:
8
8
 
9
- <code>npm i mapper-factory</code>
9
+ ```
10
+ npm i mapper-factory
11
+ ```
10
12
 
11
13
  Or using yarn
12
14
 
13
- <code>yarn add mapper-factory</code>
15
+ ```
16
+ yarn add mapper-factory
17
+ ```
14
18
 
15
19
  ## Usage
16
20
  ### Mapping simple objects
@@ -102,11 +106,33 @@ In that way you can create a new JS Object User passing a JSON object. Automatic
102
106
 
103
107
  In this specific case we have trasformed a JSON object:
104
108
 
105
- ![JSON_Object](images/json_object.png "JSON Object to convert")
109
+ ```
110
+ {
111
+ firstName: 'Rick',
112
+ lastName: 'Sanchez',
113
+ employees: [
114
+ { firstName: 'Summer', lastName: 'Smith' },
115
+ { firstName: 'Morty', lastName: 'Smith' }
116
+ ],
117
+ rolesToMap: [ 'CEO', 'EMPLOYEE' ],
118
+ boss: { firstName: 'Nello', lastName: 'Stanco' }
119
+ }
120
+ ```
106
121
 
107
122
  In this JS Object:
108
123
 
109
- ![JS_Object](images/js_object_mapped.png "JS Object mapped")
124
+ ```
125
+ User {
126
+ name: 'Rick',
127
+ surname: 'Sanchez',
128
+ employees: [
129
+ User { name: 'Summer', surname: 'Smith' },
130
+ User { name: 'Morty', surname: 'Smith' }
131
+ ],
132
+ roles: [ 'CEO TEST TRASFORMER', 'EMPLOYEE TEST TRASFORMER' ],
133
+ boss: User { name: 'Nello', surname: 'Stanco' }
134
+ }
135
+ ```
110
136
 
111
137
  Just using the constructor of *User* class.
112
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapper-factory",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "mapper for typescript object",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",