'key of' is better than Object.keys

This commit is contained in:
Cheng Zhao 2015-12-04 11:40:35 +08:00
parent 973ae06f21
commit 5e5ae81c53

View file

@ -5,7 +5,7 @@ frameToGuest = {}
# Copy attribute of |parent| to |child| if it is not defined in |child|.
mergeOptions = (child, parent) ->
for own key, value of parent when key not in Object.keys child
for own key, value of parent when key not of child
if typeof value is 'object'
child[key] = mergeOptions {}, value
else