Made API listing alphabetical, more clean and faster to print out.

This commit is contained in:
Atlante45 2014-05-30 17:40:04 -07:00
parent 2514906bd7
commit a661ea3179

View file

@ -9,14 +9,15 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var array = [];
var buffer = "";
function listKeys(string, object) {
if (string == "listKeys") {
if (string == "listKeys" || string == "array" || string == "buffer" || string == "i") {
return;
}
if (typeof(object) != "object") {
print(typeof(object) + " " + string);
array.push(string + " " + typeof(object));
return;
}
@ -30,4 +31,11 @@ function listKeys(string, object) {
}
}
listKeys("", this);
listKeys("", this);
array.sort();
for (var i = 0; i < array.length; ++i) {
buffer = buffer + "\n" + array[i];
}
print(buffer);