Skip to content
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.

Change util methods for standard ES6 ones #1

Open
8 tasks
SergioMorchon opened this issue Jun 13, 2016 · 1 comment
Open
8 tasks

Change util methods for standard ES6 ones #1

SergioMorchon opened this issue Jun 13, 2016 · 1 comment

Comments

@SergioMorchon
Copy link

SergioMorchon commented Jun 13, 2016

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

Function

  • bind remove it

Object

@brianmhunt
Copy link
Member

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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants