Temat: artJs
Dobra teraz troche zboczeń:
./com/arthwood/utils/ArrayUtils.js:11: var arr = new Array(n);
./com/arthwood/utils/ArrayUtils.js:78: var args = new Array();
./com/arthwood/utils/ArrayUtils.js:89: var result = new Array();
./com/arthwood/utils/ArrayUtils.js:145: var vResult = new Array();
./com/arthwood/utils/ArrayUtils.js:155: var vResult = new Array();
./com/arthwood/utils/ArrayUtils.js:216: var result = new Array();
./com/arthwood/utils/ObjectUtils.js:60: var result = new Array();
./com/arthwood/data/List.js:2: this.items = items || new Array();
./com/arthwood/events/DelegateCollection.js:2: this.delegates = delegates || new Array();
./com/arthwood/modules/Locator.js:3: object.instances = new Array();
1). zmiana new Array() na [] -> zysk 6 * 9 bajtów xD, co ważniejsze zysk z szybszego działania js'owych literali
2). nie wiem czy nie należaloby zastąpić w czterech ostatnich linijkach tych Arraji na ArtJs.ArrayUtils bo poto sobie dekorujemy natywnego Array'a co by go używać
./com/arthwood/utils/ObjectUtils.js:14: var copy = new Object();
./com/arthwood/utils/ObjectUtils.js:72: var result = new Object();
./com/arthwood/utils/ObjectUtils.js:84: var result = new Object();
./com/arthwood/utils/ObjectUtils.js:120: var result = new Object();
./com/arthwood/utils/ObjectUtils.js:132: var result = new Object();
./com/arthwood/utils/ObjectUtils.js:144: var result = new Object();
./com/arthwood/utils/ObjectUtils.js:166: var result = new Object();
1). zmiana new Object(); na {} -> zysk 7 * 10 bajtów xD
./com/arthwood/utils/ArrayUtils.js:137: return this.inject(arr, [], this.flattenCallback);
./com/arthwood/utils/ArrayUtils.js:203: var point = new ArtJs.Point([], []);
./com/arthwood/utils/ElementUtils.js:2: HIDDEN_ELEMENTS: [],
./com/arthwood/utils/ElementUtils.js:298: var props = subobjectMatches && ArtJs.ArrayUtils.map(ArtJs.$A(subobjectMatches), this.mapSubDC) || [];
./com/arthwood/utils/ObjectUtils.js:237: var delegate = ArtJs.$DC(this, this.parseArrayValue, false, prefix + '[]');
./com/arthwood/dom/Selector.js:65: var family = [];
./com/arthwood/dom/Selector.js:147: var elements = [];
./com/arthwood/dom/Selector.js:156: return [];
./com/arthwood/dom/Selector.js:164: return [];
./com/arthwood/dom/Selector.js:175: return [];
./com/arthwood/dom/Selector.js:185: return [];
./com/arthwood/dom/Selector.js:195: return [];
./com/arthwood/dom/Selector.js:228: var arr = au.map(matches[0] && matches[0].split(',') || [], this.attrToArrayDC);
./com/arthwood/dom/Selector.js:236: return matches && ArtJs.$A(matches) || [];
./com/arthwood/utils/ElementUtils.js:284: var result = au.inject(inputs, {}, this.serializeInjectDC);
./com/arthwood/utils/ElementUtils.js:308: (obj[prop] instanceof Object) || (obj[prop] = {});
./com/arthwood/net/Ajax.js:19: this.requestData = this.requestData || {};
./com/arthwood/Initialize.js:3: data: {},
./com/arthwood/Initialize.js:4: dom: {},
./com/arthwood/Initialize.js:5: events: {},
./com/arthwood/Initialize.js:6: math: {},
./com/arthwood/Initialize.js:7: modules: {},
./com/arthwood/Initialize.js:8: net: {},
./com/arthwood/Initialize.js:9: tween: {},
./com/arthwood/Initialize.js:11: containers: {}
./com/arthwood/Initialize.js:13: utils: {}
1). Pytanie dlaczego nie używasz ArtJs.ArrayUtils oraz ArtJs.ObjectUtils
Puszczałeś kod przez jsLinta ;) co prawda duzo jest błedów zwiazanych z indentacja i tym ze nie ma odpowiednich jsLintowych parametrów konfiguracyjnych ale ogólnie wyrzuca 4k lini z poprawkami.