mirror of
https://github.com/samsonjs/batteries.git
synced 2026-04-27 15:07:42 +00:00
accept a context in extendNative() methods
This commit is contained in:
parent
59e6566d51
commit
8b5841587f
3 changed files with 6 additions and 6 deletions
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
exports.Range = Range;
|
exports.Range = Range;
|
||||||
|
|
||||||
exports.extendNative = function() {
|
exports.extendNative = function(context) {
|
||||||
global.Range = Range;
|
context.Range = Range;
|
||||||
};
|
};
|
||||||
|
|
||||||
function Range(start, length) {
|
function Range(start, length) {
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
// readable string representations of values
|
// readable string representations of values
|
||||||
exports.repr = repr;
|
exports.repr = repr;
|
||||||
|
|
||||||
exports.extendNative = function() {
|
exports.extendNative = function(context) {
|
||||||
global.repr = repr;
|
context.repr = repr;
|
||||||
};
|
};
|
||||||
|
|
||||||
function repr(x) {
|
function repr(x) {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
exports.Set = Set;
|
exports.Set = Set;
|
||||||
|
|
||||||
exports.extendNative = function() {
|
exports.extendNative = function(context) {
|
||||||
global.Set = Set;
|
context.Set = Set;
|
||||||
};
|
};
|
||||||
|
|
||||||
var ownProps = Object.getOwnPropertyNames;
|
var ownProps = Object.getOwnPropertyNames;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue