319 private links
25 Javascript weird things
A simple library for handling keyboard shortcuts in Javascript.
La bibliothèque peut facilement s'intégrer avec un fichier JSON pour une configuration personnalisée ! 👍 Seulement pour des applications utilisant intensivement les raccourcis claviers.
Des solutions pour résoudre différents problèmes en 1 ligne de code
Actually, it is !
Thanks for this inspiring post 😄
Cet article est rempli de considérations extrêmement intéressantes sur l'intérêt qu'il y a à limiter la taille de ... tout, en fait. Mais surtout de son site web dans toutes ses dimensions : moins de features, moins de dépendances, ...
(via https://nicolas-delsaux.hd.free.fr/Shaarli/?uyqHfg)
In Vue 2, to bind a class from a parent to a child component, the child must have :class="data.staticClass || ''"
La différence entre les variables primitives (string, number, boolean) et les complexes (object)
WTF is the this
keyword
Setting the property name into brackets give the ability to evaluate its value as an expression. Thus custom property names can be created:
let a = {
['foo' + 1]: i,
}
console.log(a.foo1) // print 1
For the old Clippy 🤣
Using the object EventSource
from the client side in javascript ! So it allows to stream updates from a server.
Looks cool :)
Whaoouuhh 🌌
Wow there is great explanations on Generators in javascript here !
if you pass a undefined to a default parameter, the parameter will still be the default value.
i.e.
function sayHello(text = 'World') {
console.log(`Hello ${text}!`)
}
sayHello(undefined) // print "Hello World!" in the console