diff --git a/lib/range.js b/lib/range.js index 7539a28..9ed9074 100644 --- a/lib/range.js +++ b/lib/range.js @@ -3,8 +3,8 @@ exports.Range = Range; -exports.extendNative = function() { - global.Range = Range; +exports.extendNative = function(context) { + context.Range = Range; }; function Range(start, length) { diff --git a/lib/repr.js b/lib/repr.js index a022e36..e852ad5 100644 --- a/lib/repr.js +++ b/lib/repr.js @@ -4,8 +4,8 @@ // readable string representations of values exports.repr = repr; -exports.extendNative = function() { - global.repr = repr; +exports.extendNative = function(context) { + context.repr = repr; }; function repr(x) { diff --git a/lib/set.js b/lib/set.js index d72159d..3ebfaa1 100644 --- a/lib/set.js +++ b/lib/set.js @@ -3,8 +3,8 @@ exports.Set = Set; -exports.extendNative = function() { - global.Set = Set; +exports.extendNative = function(context) { + context.Set = Set; }; var ownProps = Object.getOwnPropertyNames;