This commit is contained in:
2021-11-01 21:52:13 +03:00
parent 353e0715ca
commit 82452a959e
12 changed files with 798 additions and 844 deletions
+9 -2
View File
@@ -31,7 +31,7 @@ print_r($x);
console.log(true, msg);
return;
}
console.error(msg, value, need);
console.error(msg, '-', 'value:', value, 'need:', need);
}
</script>
@@ -213,7 +213,14 @@ kit.ready(['collection'], function () {
assertSame(x3.last(), 111, 'only last+');
assertSame(x3.length, 1, 'only length');
x.
xOb = {a: 'a10', b: 'b11', 10: 101};
x = new kit.Collection(xOb);
x.set(11, 111);
assertSame(x.indexKey(11), 3, 'indexKey (int)');
assertSame(x.indexKey('11'), 3, 'indexKey (string)');
assertSame(x.indexKey('111'), -1, 'indexKey (-1)');
});