mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-18 01:40:32 +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
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
var array = [];
|
||||||
|
var buffer = "";
|
||||||
function listKeys(string, object) {
|
function listKeys(string, object) {
|
||||||
if (string == "listKeys") {
|
if (string == "listKeys" || string == "array" || string == "buffer" || string == "i") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof(object) != "object") {
|
if (typeof(object) != "object") {
|
||||||
print(typeof(object) + " " + string);
|
array.push(string + " " + typeof(object));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,3 +32,10 @@ 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