Skip to content

Commit b647d42

Browse files
committed
Refactor.
1 parent b7ff0b4 commit b647d42

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lib/document.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ module.exports = class Document
8080
return
8181
throw exceptions.ArgumentError('Argument error for enju.Document.define()')
8282

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

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

366-
delete: (refresh=no) -> new Promise (resolve, reject) =>
366+
delete: (refresh = no) -> new Promise (resolve, reject) =>
367367
###
368368
Delete this document.
369369
@returns {promise<Document>}

src/lib/query.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class QueryCell
5555

5656

5757
module.exports = class Query
58-
constructor: (documentClass, queryCells=[]) ->
58+
constructor: (documentClass, queryCells = []) ->
5959
###
6060
@param documentClass {constructor} The document's constructor.
6161
###
@@ -499,7 +499,7 @@ module.exports = class Query
499499
@param queryCell: {QueryCell}
500500
@returns {object}
501501
###
502-
bleachRegexCode = (value='') ->
502+
bleachRegexCode = (value = '') ->
503503
value = "#{value}"
504504
table = '^$*+?{}.[]()\\|/'
505505
result = []

0 commit comments

Comments
 (0)