Skip to content

Commit

Permalink
refactor: use rfdc to replace lodash (#65)
Browse files Browse the repository at this point in the history
* refactor: use rfdc to replace lodash
* fix: make eslint happy
  • Loading branch information
SukkaW authored Nov 4, 2019
1 parent c467f21 commit 2170bf4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/document.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const cloneDeep = require('lodash/cloneDeep');
const cloneDeep = require('rfdc')();

class Document {

Expand Down
2 changes: 1 addition & 1 deletion lib/model.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const { EventEmitter } = require('events');
const cloneDeep = require('lodash/cloneDeep');
const cloneDeep = require('rfdc')();
const Promise = require('bluebird');
const { parseArgs, getProp, setGetter, shuffle } = require('./util');
const Document = require('./document');
Expand Down
4 changes: 2 additions & 2 deletions lib/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ class Schema {
* @private
*/
_parseUpdate(updates) {
return (new UpdateParser(this.paths)).parseUpdate(updates);
return new UpdateParser(this.paths).parseUpdate(updates);
}

/**
Expand All @@ -663,7 +663,7 @@ class Schema {
* @private
*/
_execQuery(query) {
return (new QueryParser(this.paths)).execQuery(query);
return new QueryParser(this.paths).execQuery(query);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
"cuid": "^2.1.4",
"graceful-fs": "^4.1.3",
"is-plain-object": "^3.0.0",
"lodash": "^4.17.10"
"rfdc": "^1.1.4"
},
"devDependencies": {
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"eslint": "^6.1.0",
"eslint-config-hexo": "^3.0.0",
"jsdoc": "^3.4.0",
"lodash": "^4.17.15",
"minami": "^1.1.1",
"mocha": "^6.0.2",
"nyc": "^14.1.1",
Expand Down

0 comments on commit 2170bf4

Please sign in to comment.