mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 02:53:43 +02:00
Made API listing alphabetical, more clean and faster to print out.
This commit is contained in:
parent
2514906bd7
commit
a661ea3179
1 changed files with 12 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue