Last modified: 2014-11-10 23:38:45 UTC
So instead of: oo.extendObject oo.isPlainObject oo.cloneObject oo.getObjectKeys oo.getObjectValues oo.simpleArrayUnion We'd have: oo.Object.extend oo.Object.isPlain oo.Object.clone oo.Object.keys (obsolete, ES5 has Object.keys) oo.Object.values oo.Array.quickUnion (or something like that) More like YUI for example, as well as like methods in javascript itself. --- Migrated from https://github.com/trevorparscal/oojs/issues/23
Not actually sure we want to do this. It's an interesting idea, but not worth breaking the API for, and considering the minimal size of the library, keeping this back-compat would be a fair amount of code. Hopefully, the OOjs API will become smaller as time goes on when we start adopting more ES5 feature, and use global es5 shims for older browsers instead of aliases in other host objects (like jQuery.trim, jQuery.proxy, ve.indexOf and OO.getObjectkeys; instead of String#trim, Function#bind, Array#indexOf and Object.keys)
This is nice for a framework design, but for OOjs. We use native methods instead, more with es5-shim. We don't need many utility methods or an extendable base like that.