From a661ea317973dbed94998d94b56106f6d6d70c1c Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 30 May 2014 17:40:04 -0700 Subject: [PATCH] Made API listing alphabetical, more clean and faster to print out. --- examples/currentAPI.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/examples/currentAPI.js b/examples/currentAPI.js index fe562887f9..eb5dc3191e 100644 --- a/examples/currentAPI.js +++ b/examples/currentAPI.js @@ -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); \ No newline at end of file +listKeys("", this); +array.sort(); + +for (var i = 0; i < array.length; ++i) { + buffer = buffer + "\n" + array[i]; +} + +print(buffer);