knockout / tko.utils

Knockout Utilities (Javascript)
MIT License
7 stars 3 forks source link

Change util methods for standard ES6 ones #1

Open SergioMorchon opened 8 years ago

SergioMorchon commented 8 years ago

There are a lot of "util" methods present in current Knockout code that are part of the ES6 definitions. They are also implemented in shims, as Babel presets for example. So there is no more need to implement them by our side. Just use the ES6 definition and let the transpilers do the rest. We can use them directly or adapt the inner code to reuse them, but not reimplementing the wheel. I'll list all of them here:

Array

brianmhunt commented 8 years ago

Thanks Sergio!

Updating the utils is definitely on the TODO.

Instead of the builtins, I've considered importing the lodash utils. I'm on the fence, because lodash typically faster than the builtins, but it is an external dependency ...

I definitely feel like TKO ought to defer to standards + polyfills (e.g. core.js).