sortedKeys(obj, key, sortmode) {
			if (obj == null || typeof(obj) != 'object')
				return [];

			return Object.keys(obj).map(e => {
				let v = (key != null) ? obj[e][key] : e;

				switch (sortmode) {
				case 'addr':
					v = (v != null) ? v.replace(/(?:^|[.:])([0-9a-fA-F]{1,4})/g,
						(m0, m1) => (`000${m1.toLowerCase()}`).substr(-4)) : null;
					break;

				case 'num':
					v = (v != null) ? +v : null;
					break;
				}

				return [ e, v ];
			}).filter(e => e[1] != null).sort((a, b) => naturalCompare(a[1], b[1])).map(e => e[0]);
		}
Return an array of sorted object keys, optionally sorted by
a different key or a different sorting mode.

@instance
@memberof LuCI

@param {object} obj
The object to extract the keys from. If the given value is
not an object, the function will return an empty array.

@param {string|null} [key]
Specifies the key to order by. This is mainly useful for
nested objects of objects or objects of arrays when sorting
shall not be performed by the primary object keys but by
some other key pointing to a value within the nested values.

@param {"addr"|"num"} [sortmode]
Can be either `addr` or `num` to override the natural
lexicographic sorting with a sorting suitable for IP/MAC style
addresses or numeric values respectively.

@return {string[]}
Returns an array containing the sorted keys of the given object.