Skip to content

Commit

Permalink
fix: relax properties excluded from copy
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Sep 20, 2021
1 parent d001c6f commit d22c51a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ mutate = ->
# See
# https://github.com/adaltas/node-mixme/issues/1
# https://github.com/adaltas/node-mixme/issues/2
continue if /__proto__|constructor|prototype|eval|function|\*|\+|;|\s|\(|\)|!/.test name
# continue if /__proto__|constructor|prototype|eval|function|\*|\+|;|\s|\(|\)|!/.test name
# Unless proven wrong, I consider ok to copy any properties named eval
# or function, we are not executing those, only copying.
continue if /__proto__|constructor|prototype/.test name
target[name] = mutate target[name], source[name]
else if Array.isArray source
target = for v in source
Expand Down

0 comments on commit d22c51a

Please sign in to comment.