Add backwards compatibility for older versions of node.
poeticninja opened this issue · 3 comments
I am working with an older version of node and not able to use per-env
. Older versions of node do not have Object.assign and you get an error.
var env = Object.assign(
^
TypeError: undefined is not a function
1.) This could easily be solved by implementing the poyfill from MDN in a separate file and if the pollyfill is needed it would be required.
2.) The second option would be to just include and use https://www.npmjs.com/package/object-assign instead.
I can make a pull request for either option.
What version of node should be supported? The LTS version supports it (v4?) I thought:
That is a good question. 😉
I am working on a project that is 0.12.x. But with a pollyfill or with using the module object-assign
it would allow support back to 0.10.x or maybe even further.
It sounds dickish, but I kinda don't want to support old versions like v0.10 or v0.12 & add dependencies.
Especially since we're the primary users of this lib, we have the luxury of upgrading to v7 if we wanted to :D