diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/util.js b/lib/util.js index 4648ee9..4f3964e 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,4 +1,4 @@ -/*global exports: false, require: false, console: false */ +/*global exports: false, require: false, console: false, Cc: false, Ci: false */ /*jslint onevar: false */ // Released under the MIT/X11 license // http://www.opensource.org/licenses/mit-license.php @@ -28,12 +28,11 @@ var {Cc,Ci} = require("chrome"); * </pre> */ exports.heir = function heir(p) { - function f() {}; - f.prototype = p.prototype; - return new f(); + function F() {}; + F.prototype = p.prototype; + return new F(); }; - exports.getBugNo = function getBugNo(url) { var re = new RegExp(".*id=([0-9]+).*$"); var bugNo = null; @@ -187,3 +186,13 @@ var filterByRegexp = exports.filterByRegexp = return ""; } }; + +exports.getObjectKeys = function getObjectKeys(obj) { + var keys = []; + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + keys.push(key); + } + } + return keys; +};
\ No newline at end of file |