1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-14 10:35:47 +01:00

Localizify sanitizer descriptions.

This commit is contained in:
Kris Maglione
2011-03-07 19:18:09 -05:00
parent 274091eb79
commit cd4c0a7722
3 changed files with 20 additions and 11 deletions

View File

@@ -207,8 +207,8 @@ defineModule("base", {
"Struct", "StructBase", "Timer", "UTF8", "XPCOM", "XPCOMUtils", "XPCSafeJSObjectWrapper",
"array", "bind", "call", "callable", "ctypes", "curry", "debuggerProperties", "defineModule",
"deprecated", "endModule", "forEach", "isArray", "isGenerator", "isinstance", "isObject",
"isString", "isSubclass", "iter", "iterAll", "keys", "memoize", "octal", "properties",
"require", "set", "update", "values", "withCallerGlobal"
"isString", "isSubclass", "iter", "iterAll", "iterOwnProperties","keys", "memoize", "octal",
"properties", "require", "set", "update", "values", "withCallerGlobal"
],
use: ["config", "services", "util"]
}, this);
@@ -279,6 +279,11 @@ function properties(obj, prototypes, debugger_) {
}
}
function iterOwnProperties(obj) {
for (let prop in properties(obj))
yield [prop, Object.getOwnPropertyDescriptor(obj, prop)];
}
function deprecated(alternative, fn) {
if (isObject(fn))
return Class.Property(iter(fn).map(function ([k, v]) [k, callable(v) ? deprecated(alternative, v) : v])