Skip to content

Commit

Permalink
Refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
kelp404 committed Sep 11, 2018
1 parent b7ff0b4 commit b647d42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/lib/document.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ module.exports = class Document
return
throw exceptions.ArgumentError('Argument error for enju.Document.define()')

@get = (ids, fetchReference=yes) -> new Promise (resolve, reject) =>
@get = (ids, fetchReference = yes) -> new Promise (resolve, reject) =>
###
Fetch the document with id or ids.
If the document is not exist, it will return null.
Expand Down Expand Up @@ -323,7 +323,7 @@ module.exports = class Document
console.error error
throw error

save: (refresh=no) -> new Promise (resolve, reject) =>
save: (refresh = no) -> new Promise (resolve, reject) =>
###
Save this document.
@param refresh {bool} Refresh the index after performing the operation.
Expand Down Expand Up @@ -363,7 +363,7 @@ module.exports = class Document
@version = response._version
resolve @

delete: (refresh=no) -> new Promise (resolve, reject) =>
delete: (refresh = no) -> new Promise (resolve, reject) =>
###
Delete this document.
@returns {promise<Document>}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/query.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class QueryCell


module.exports = class Query
constructor: (documentClass, queryCells=[]) ->
constructor: (documentClass, queryCells = []) ->
###
@param documentClass {constructor} The document's constructor.
###
Expand Down Expand Up @@ -499,7 +499,7 @@ module.exports = class Query
@param queryCell: {QueryCell}
@returns {object}
###
bleachRegexCode = (value='') ->
bleachRegexCode = (value = '') ->
value = "#{value}"
table = '^$*+?{}.[]()\\|/'
result = []
Expand Down

0 comments on commit b647d42

Please sign in to comment.