Scott Sauyet:
> I'm looking for a critique of an API. I built this some months ago,
> and
> might need it again, and would love to have other eyes on it.
>
> On a recent project I found myself in need of some configuration data
> that could be easily changed, data in which one value was based upon
> another. And I created a generic constructor function to do it. I
> have no idea if this would be useful to anyone else, but just in case,
> I thought I'd share.
If I remember correct I and Stefan Weiss have discussed the API at
c.l.js before. It seems API is enough useful and convenient, I am
interested in the opinion of the others members, too.
Only one issue with:
merge = function(base, ext) {
//...
};
I don't know which engines are target of your code, but older JScript
versions has trouble with enumeration of user defined properties which
are same as bult-in properties of `Object.prototype'.
See the blog post of Garret:
<URL: http://dhtmlkitchen.com/learn/js/enumeration/dontenum.jsp>
If you are interested, see how I've fixed the issue:
<URL: https://github.com/abozhilov/Duke/blob/master/src/Duke.js>
See `mixin' and detection of DontEnum bug.
HTH
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]