looking at documenting /src/foundation/gclib_misc.js:
- $method: why is this function prefixed with a $-sign? should that
imply that it deals with metaprogramming? in that case it seems
inconsistent when looking at to_f which also deals with
metaprogramming but follows a Ruby naming convention (if i am not
mistaken). but then it seems unused anyway.
- $method: another Javascript question:
the function uses obj[method](x); if method is 'foobar' for example,
are these two lines equivalent?
obj['foobar'](x);
obj.foobar(x);
so you can always use hash keys instead of the dot-notation to call
functions in objects in Javascript?
- to_f: i'd like to suggest two one-line additions:
first line: if (!x) return null;
last line: return null; (not sure if that is redundant in Javascript,
but it clarifies the programmer's intention)
- what does rebuzz do? although it seems unused.
- tag: it seems that a given attribute 'cls' overrides the classes
specified in the tag's name. could the code be changed to this?
if (attrs.cls) {
attrs['class'] = attrs.cls;
delete attrs.cls;
} else if (name.contains('.')) {
var words = name.split('.');
name = words[0];
attrs['class'] = words.slice(1).join(' ');
}
on the other hand, 'cls' does not seem to be used at all (atm), so we
might actually drop support for it?
- json_eval: it seems unused, but i assume it is supposedly taking a
JSON expression as argument and evaluates it?
- index_item(s)_by: they seem unused and i am not sure if index_item_by
is actually doing what it is supposed to do. remove them?
bye,
marmorkuchen
--
_ ascii ribbon campaign .oOo. GCSd-s:+aC++ULB+++W++M+PS+++Y+
( )
X Trust your technolust!
/ \