UMD definition was mistakenly assigning values to the root scope (window or global), asroot was being passed for AMD and Node in place of exports.
Fixed root reference for use inside webpack; The value of this does not reliably point to the window/global/module scope due to during webpacks module compilation. Modules are wrapped in a closure, so the value of this is different than the source. To make this more reliable, I've updated the root object detection to make it more expicit.
root = if window? then window else if global? then global else @;
Also a minor change to stash the regex definition for matching accessors during pointer coercion.
I've bumped the version # in package.json to 0.7.0, as this seemed worth of a minor bump. That is, of course, your decision.
Hope to get this merged. I like the explicit and clear definition of your JSONPatch implementation, so I hope to use it in a webpack-based project.
UMD definition was mistakenly assigning values to the root scope (window or global), as
root
was being passed for AMD and Node in place of exports.Fixed root reference for use inside webpack; The value of
this
does not reliably point to the window/global/module scope due to during webpacks module compilation. Modules are wrapped in a closure, so the value ofthis
is different than the source. To make this more reliable, I've updated theroot
object detection to make it more expicit.root = if window? then window else if global? then global else @;
Also a minor change to stash the regex definition for matching accessors during pointer coercion.
I've bumped the version # in package.json to 0.7.0, as this seemed worth of a minor bump. That is, of course, your decision.
Hope to get this merged. I like the explicit and clear definition of your JSONPatch implementation, so I hope to use it in a webpack-based project.
Thanks.