Echo JS 0.11.0

<~>

sylvainpv comments

sylvainpv 3517 days ago. link 1 point
Maybe you can use rollup or similar to bundle moment inside this lib and use tree-shaking to reduce the final size ?

About the polyfill, of course it is more complicated than that. There's no test of support, the value formatting is different, the optional HTML attributes are not handled etc. This would imply major changes in your library to mimic the standard.
sylvainpv 3517 days ago. link 1 point
There are already many datepickers, but I never found one without any depedencies at all and working as a polyfill for input type="date".
sylvainpv 3519 days ago. link 1 point
I agree that type checking at runtime is really important for JS applications. That's why I made this: http://objectmodel.js.org ; it works really well with Babel, and it has non-nullable types by default from the beginning
sylvainpv 3534 days ago. link 2 points
You talk about the risk of code injection but it seems you don't care at all. This test for detecting serialized functions is ridiculously weak, making a XSS with this example as easy as:

let person ={
  name: 'function f(){},alert("XSS")'
};

Of course you can try to sanitize any user-inserted data, but unless you like playing russian roulette, I strongly discourage you to go that way.
sylvainpv 3575 days ago. link 1 point
Are you referring to the new API such as #array.findIndex ? I think the bublé approach makes sense. Polyfilling, when possible, is better than transpiling because it adapts to the user browser capacities. When using a polyfill service such as polyfill.io, only the necessary polyfills are loaded ; which means smaller bundle size and increased perf with the built-in features. This is actually very smart in my opinion.
sylvainpv 3576 days ago. link 1 point
Looks very promising. Did anyone try it combined with a polyfill service such as polyfills.io ? Or is es6-shim mandatory ?
sylvainpv 3576 days ago. link 3 points
not if you consider false as a different value than undefined/null
sylvainpv 3580 days ago. link 0 point
People are confused because the name is confusing and the bluebird API is bloated. We could just write Promise.resolve().then instead of Promise.try
sylvainpv 3638 days ago. link 2 points
okay it's a shame. I guess I just copy paste what I need then.
[more]