Difference in return of value of `addWordSync` and given value to `addWord` callback
wooorm opened this issue · 1 comments
wooorm commented
addWordSync
and removeWordSync
return boolean
s (probably whether the operation was ok), but addWord
and removeWord
pass the operated on word to callback
.
nathanjsweet commented
The reason this is done, is because it is presumed that if you are calling the method synchronously you have access to whatever word it is that you added or removed, whereas if you are doing it asynchronously you may not know what word was added/removed if you are using a general purpose function and adding/removing words quite rapidly.