File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " normalize-mongoose" ,
3
- "version" : " 0.0.1-alpha " ,
3
+ "version" : " 0.0.1" ,
4
4
"description" : " Normalize Mongoose JSON output" ,
5
5
"license" : " MIT" ,
6
6
"repository" : " abranhe/normalize-mongoose" ,
Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ $ npm install abranhe@normalize-mongoose
22
22
import mongoose from ' mongoose' ;
23
23
import normalize from ' normalize-mongoose' ;
24
24
25
- const pesonSchema = mongoose .Schema ({
25
+ const personSchema = mongoose .Schema ({
26
26
name: String ,
27
27
age: Number ,
28
28
});
29
29
30
- pesonSchema .plugin (normalize);
30
+ personSchema .plugin (normalize);
31
31
```
32
32
33
33
See how ` normalize-mongoose ` will clean the the JSON output:
@@ -57,16 +57,16 @@ See how `normalize-mongoose` will clean the the JSON output:
57
57
import mongoose from ' mongoose' ;
58
58
import normalize from ' normalize-mongoose' ;
59
59
60
- const pesonSchema = mongoose .Schema ({
60
+ const personSchema = mongoose .Schema ({
61
61
name: String ,
62
62
age: Number ,
63
63
email: String ,
64
64
password: { type: String , private: true },
65
65
});
66
66
67
- pesonSchema .plugin (normalize);
67
+ personSchema .plugin (normalize);
68
68
69
- const Person = mongoose .model (' Person' , pesonSchema );
69
+ const Person = mongoose .model (' Person' , personSchema );
70
70
const someone = new Person ( {
71
71
name: ' Abraham' ,
72
72
age: 33 ,
You can’t perform that action at this time.
0 commit comments