JavaScript module bundles are a syntax for bundling multiple modules into a single JavaScript file.
A quick example:
// filename: app.jsb
module "./count.js" {
JavaScript module bundles are a syntax for bundling multiple modules into a single JavaScript file.
A quick example:
// filename: app.jsb
module "./count.js" {
If you search npm
with query try await
you will find a big modules list (you can find it in the boottom).
What all this developers want is just more clear way to use try catch. All of them suggest to use:
const tryCatch = require('try-catch');
const [error, data] = tryCatch(JSON.parse, 'hello');
I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a bit harder on immutability lately to be able to build on top of it. Both have various tradeoffs but others are doing good research in other areas, so we've decided to focus on this direction and see where it leads us.
I did want to address a few points that I didn't see get enough consideration around the tradeoffs. So here's a small brain dump.
"Compiled output results in smaller apps" - E.g. Svelte apps start smaller but the compiler output is 3-4x larger per component than the equivalent VDOM approach. This is mostly due to the code that is usually shared in the VDOM "VM" needs to be inlined into each component. The tr
alert('Hej. Napisz tu litere polskiego alfabetu i zobacz, jak ta litera sie pisze w jezyku ukrainskim') | |
function isRussian(a) { | |
return /[А-Яа-я]/.test(a) | |
}; | |
const data = { | |
'a' : 'а', |
This is for those using Emotion CSS
jscodeshift -t codemod__emotion_styled.js DIRECTORY_TO_RECURSIVELY_MOD
Limitations: only works for styled
calls that have exactly one argument.
Thanks to Andrew Levine for their great intro to codemods here: https://medium.com/@andrew_levine/writing-your-very-first-codemod-with-jscodeshift-7a24c4ede31b
I was trying to understand JavaScript Promises by using various libraries (bluebird, when, Q) and other async approaches.
I read the spec, some blog posts, and looked through some code. I learned how to
docker run -d --name es elasticsearch
docker run -d --name logstash --link es:elasticsearch logstash -v /tmp/logstash.conf:/config-dir/logstash.conf logstash logstash -f /config-dir/logstash.conf
docker run --link es:elasticsearch -d kibana
LOGSTASH_ADDRESS=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' logstash)
# Convert .flac to .mp3 (lossless) | |
for f in *.flac; do ffmpeg -i "$f" -aq 1 "${f%flac}mp3"; done | |
# Convert .flac to .mp3, compress to ~ 120k | |
for f in *.flac; do ffmpeg -i "$f" -aq 5 "${f%flac}mp3"; done | |
# Convert .flac to mp3, compress to ~ 128k | |
for f in *.flac; do ffmpeg -i "$f" -b:a 128k "${f%flac}mp3"; done | |
# Convert .flac to mp3, compress to variable 190k |
Here are my attempts to script an IntelliJ-based IDE using javax.script.*
API (ex-JSR-223).
The list of available scripting languages and engines:
<app>/lib/groovy-jsr223-xxx.jar
<app>/jbr/...
(deprecated and will be removed soon)