Index: src/collection.js |
diff --git a/src/collection.js b/src/collection.js |
index f0bc42392d9b117e3204e0135d2bb621ff248eb3..6d43384e1cecf440de2abc3067cab0a51528ae9c 100644 |
--- a/src/collection.js |
+++ b/src/collection.js |
@@ -4,14 +4,6 @@ |
var $getHash; |
var $getExistingHash; |
-var $mapSet; |
-var $mapHas; |
-var $mapDelete; |
-var $setAdd; |
-var $setHas; |
-var $setDelete; |
-var $mapFromArray; |
-var $setFromArray; |
(function(global, utils) { |
"use strict"; |
@@ -487,15 +479,8 @@ utils.InstallFunctions(GlobalMap.prototype, DONT_ENUM, [ |
// Expose to the global scope. |
$getHash = GetHash; |
$getExistingHash = GetExistingHash; |
-$mapGet = MapGet; |
-$mapSet = MapSet; |
-$mapHas = MapHas; |
-$mapDelete = MapDelete; |
-$setAdd = SetAdd; |
-$setHas = SetHas; |
-$setDelete = SetDelete; |
- |
-$mapFromArray = function(array) { |
+ |
+function MapFromArray(array) { |
var map = new GlobalMap; |
var length = array.length; |
for (var i = 0; i < length; i += 2) { |
@@ -506,7 +491,7 @@ $mapFromArray = function(array) { |
return map; |
}; |
-$setFromArray = function(array) { |
+function SetFromArray(array) { |
var set = new GlobalSet; |
var length = array.length; |
for (var i = 0; i < length; ++i) { |
@@ -515,4 +500,19 @@ $setFromArray = function(array) { |
return set; |
}; |
+// ----------------------------------------------------------------------- |
+// Exports |
+ |
+utils.ExportToRuntime(function(to) { |
+ to.MapGet = MapGet; |
+ to.MapSet = MapSet; |
+ to.MapHas = MapHas; |
+ to.MapDelete = MapDelete; |
+ to.SetAdd = SetAdd; |
+ to.SetHas = SetHas; |
+ to.SetDelete = SetDelete; |
+ to.MapFromArray = MapFromArray; |
+ to.SetFromArray = SetFromArray; |
+}); |
+ |
}) |