build/src/transistor.js in transistor-0.1.11 vs build/src/transistor.js in transistor-0.1.12
- old
+ new
@@ -181,22 +181,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);
}
},
@@ -253,10 +255,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;