build/src/transistor-radio.js in transistor-0.1.11 vs build/src/transistor-radio.js in transistor-0.1.12
- old
+ new
@@ -97,22 +97,24 @@
}
throw new Error("unknown id: " + id);
}
};
- }());
-
- return {
- set: function (collection) {
+ }()),
+ set = function (collection) {
H.clear();
if (collection !== undefined) {
for (var i = 0 ; i < collection.length; i += 1) {
array[i] = collection[i];
}
}
- },
+ };
+
+ return {
+ init: set,
+ set: set,
insert: function (entry) {
if (entry !== undefined) {
array.push(entry);
}
},
@@ -169,10 +171,10 @@
throw new Error("undefined arguments");
}
switch (event) {
case 'init':
- target.set(args);
+ target.init(args);
break;
case 'set':
validate.collection(args);
target.set(args.collection);
break;