Skip to content

Commit 8f1fa8c

Browse files
committed
Use lodash modules instead of the whole package
1 parent 08ffe35 commit 8f1fa8c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/schema.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import Model from './model';
22
import SchemaType from './schematype';
33
import ObjectId from './objectid';
4-
import _ from 'lodash';
4+
import assign from 'lodash.assign';
5+
import cloneDeep from 'lodash.clonedeep';
56

67
const allowedTypes = [
78
ObjectId,
@@ -72,9 +73,9 @@ export default class Schema {
7273
},
7374
};
7475

75-
const obj = _.cloneDeep(object);
76+
const obj = cloneDeep(object);
7677

77-
return _.extend(mainPropsObj, obj);
78+
return assign(mainPropsObj, obj);
7879
}
7980

8081
static _buildTypes(object) {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
},
3434
"license": "MIT",
3535
"dependencies": {
36-
"lodash": "^3.10.1"
36+
"lodash.assign": "^3.2.0",
37+
"lodash.clonedeep": "^3.0.2"
3738
}
3839
}

0 commit comments

Comments
 (0)