jsdf / browserify-incremental

incremental rebuild for browserify
175 stars 13 forks source link

Lets promote modern Js #28

Closed antono closed 7 years ago

antono commented 8 years ago

xtend -> Object.assign

Macil commented 8 years ago

Object.assign doesn't work in node v0.12, does it? Is that version still popular? I know it's still maintained for ... well only a few more months. Enforcing node v4 as the minimum version would be a little nice since a lot of other ES6 stuff would be available too (arrow functions, let/const). Might want to do a major version bump and put "engines": {"node": ">=4.0.0"}, if that's done while node v0.12 is still maintained.

antono commented 8 years ago

Good points. Agree.

antono commented 7 years ago

Hey, this is just README.md :) So you can safely promote modern js without any changes to package.json ;)

Macil commented 7 years ago

Haha, I completely overlooked that this change was just in the readme.

Macil commented 7 years ago

Actually there is a difference between xtend and Object.assign: xtend makes a new object while Object.assign mutates its first parameter. I've made a commit d947f9c0dcc529f29c86753d72770c1e530043dd to make the example equivalent to the old behavior so the user doesn't mutate that object.

antono commented 7 years ago

:+: