markstos, to javascript
@markstos@urbanists.social avatar

Is EventEmitter the GOTO of #javascript ?

rauschma, to javascript
@rauschma@fosstodon.org avatar

Upcoming iterator methods:

// Without iterator methods:
const arr = Array.from(myMap.keys())
.filter(k => isPublic(k));

// With iterator methods:
const arr = myMap.keys()
.filter(k => isPublic(k))
.toArray();

(I prefer not to do .filter(isPublic) because isPublic() may gain more parameters in the future.)

https://2ality.com/2022/12/iterator-helpers.html

marmelab, to php
@marmelab@mastodon.social avatar

🎉 Exciting news! Marmelab is sponsoring the API Platform Conference 2024, the flagship event dedicated to the API Platform framework!

Join us for 2 days of talks by leading experts in , & .

📅 19 & 20 September
📍 Lille, France

Learn more: https://api-platform.com/fr/con/2024/

@cooptilleuls

scy, to javascript
@scy@chaos.social avatar

Theo on const vs let in :

https://youtu.be/dqmtzHB2zTM (32 min).

It's a long video, and he's basically only reacting to and commenting on Let me be https://www.epicweb.dev/talks/let-me-be (12 min) by Ryan Florence.

Theo's main point is that const doesn't mean "this value will never change" (since objects and arrays can obviously still be mutated), but that let means "pay attention, this value will be reassigned further down", and I totally agree.

toxi, (edited ) to typescript
@toxi@mastodon.thi.ng avatar

Useful snippet for computing pixel dimensions from paper sizes (both metric (DIN) and (US) imperial presets included) using https://thi.ng/units, an elaborate & powerful unit converter/calculator/DSL for all SI dimensions:

Full list of predefined constants:
https://github.com/thi-ng/umbrella/tree/develop/packages/units#constants

#ThingUmbrella #Units #Conversion #TypeScript #JavaScript

dethos, to security
@dethos@s.ovalerio.net avatar
aral, to SmallWeb
@aral@mastodon.ar.al avatar

:kitten: 🎉

Kitten now has a lovely new multi-page Settings screen and… drumroll… a new 🐢 interactive shell (REPL) for you to play with the running state of your Small Web site/app/place and debug your app, inspect/manipulate its database, etc.

I plan on recording demos of each of them tomorrow but you can play with them now.

And here’s a little tutorial to get you started with the shell:

https://codeberg.org/kitten/app#kitten-s-interactive-shell

💕

Screenshot of Kitten running in terminal: 🌍 Domain https://localhost 📂 Source /var/home/aral/Projects/kitten/app/examples/file-uploads 💾 Databases /var/home/aral/.local/share/small-tech.org/kitten/databases 🐢 To launch an interactive shell, press the [s] key. Server is running and listening for connections… s 🐢 Launching interactive shell ctrl-d to exit; .help for assistance A good place to start is to run the .ls command to see the keys of the global kitten object: » 💡.ls is an alias for Object.keys(kitten) [ 'version', 'domain', 'port', 'app', 'databaseDirectory', 'projectIdentifier', 'deploy', 'WebSocket', 'html', 'libraries', 'page', 'events', 'css', 'js', 'markdown', 'md', 'safelyAddHtml', 'sanitise', 'uploadsDirectory', '_db', 'uploads', 'package', 'db' ] 🐱 💬 kitten.db.images[0] Proxy [ { path: '/uploads/1a6c2612-057d-435b-83c7-7157b4add982/', altText: 'Screenshot of Draw Together sketch that reads Free Gaza!' }, { get: [Function: bound getHandler], set: [Function: bound setHandler], defineProperty: [Function: bound definePropertyHandler], deleteProperty: [Function: bound deletePropertyHandler] } ] 🐱 💬

stefan, to javascript
@stefan@stefanbohacek.online avatar

I've been really enjoying working with Wikidata lately, setting up automated accounts like @libraries, @parks, and @lighthouses.

To see what else you can do with Wikidata, and to learn how to use it, check out a tutorial I put together: https://stefanbohacek.com/blog/making-a-map-of-unesco-world-heritage-sites/

zalasur, to javascript
@zalasur@mastodon.surazal.net avatar

It's been almost a decade since I've done a live coding stream. This will be fun!

Today I'll be migrating my website from React to Lit, which is a lightweight framework built around web components. I have the scaffolding set up mostly, so now it's time to get this done.

Come watch. Ask questions in chat! You don't need to create an account, just a username is needed to participate.

https://video.surazal.net/w/5S7FPXJMZh1i1eqZLY9mcV

craigabbott, to javascript
@craigabbott@a11y.info avatar

I was today years old and 4 hours down when I learned you cannot deep clone an instance of a class 😩

chipx86, to Discord
@chipx86@mastodon.online avatar

Hey, developers: The @reviewboard team's starting a new for devs to hang out, chat, and share what you're building.

https://discord.gg/saMCqHEZ

We have channels for , , / , , , and more.

You don't need to use or contribute to Review Board to hang out. (But you can follow development there, if you want.)

We hope to see people come in and hang out. The aim is a friendly, diverse community of devs.

Feel free to pass along the invite!

a11yclub, to CSS
@a11yclub@mastodon.social avatar

Just in: Alongside @karlgroves and @erikKroes, @5t3ph will also be offering a workshop in Amsterdam on 9 June:

Beyond : Requirements for Accessible Components

Participation in half-day workshops costs from € 25, full-day workshops from € 50. Further workshops can be added at any time. Get your tickets: https://ti.to/tollwerk/accessibility-club-summit-2024

More info: https://accessibility.club/event/accessibility-club-summit-2024#schedule-2024-06-09

MaxArt2501, to javascript
@MaxArt2501@mastodon.social avatar

A response to @cferdinandi 's recent post(s) on JavaScript and Web Components:
https://dev.to/maxart2501/javascript-is-not-the-problem-k4e

I know he didn't explain his position in details, so a 1800-word article sounds a little unfair, but I think dry and sharp statements need adequate context and analysis.

decompwlj, to mathematics
@decompwlj@mathstodon.xyz avatar
SocketSecurity, to programming
@SocketSecurity@fosstodon.org avatar

LDAPjs, an LDAP client and server API for Node.js, was decommissioned after its maintainer received an abusive email from a user, raising concerns about this form of abuse as a potential attack vector. https://socket.dev/blog/ldapjs-open-source-project-decommissioned-after-maintainer-receives-abusive-email

YurkshireLad, to javascript
@YurkshireLad@mastodon.social avatar

These questions/answers make me glad I'm not working with anymore!

"lydiahallie/javascript-questions: A long list of (advanced) JavaScript questions, and their explanations"

https://github.com/lydiahallie/javascript-questions

domhabersack, to javascript
@domhabersack@mastodon.social avatar

You can turn off the “x packages are looking for funding” messages that get logged with each npm install by setting

fund = false

in your project’s or user’s npmrc file.

https://domhabersack.com/blog/npm-fund-false

janl, to random
@janl@narrativ.es avatar

Funny, in it is unnerving to use a library version that has not had a release in four days. https://social.vivaldi.net/@Patricia/112447339260051370

henrikjernevad, to javascript
@henrikjernevad@mastodon.social avatar

Another leak in the JavaScript single-threaded facade (or a bug in Jest, really).

Asserting expect(...).toStrictEqual(...) fails with two structurally identical objects created by two different Node worker threads because their prototypes are not the same (though identical). Asserting expect(structuredClone(...)).toStrictEqual(structuredClone(...)) works.

davidbisset, to javascript
@davidbisset@phpc.social avatar

Five Basic Things About That Will Help Non JavaScript-Focused Web
https://frontendmasters.com/blog/5-things-designers-can-do-with-javascript/

christian, to webdev
@christian@aldr.social avatar

Enhancing my JavaScript knowledge bit by bit - today with a fun short clip by @cferdinandi and @kevinpowell; explaining var, let, and const - and when/where to use them for declaring a variable.

https://www.youtube.com/watch?v=pobWEaHNChY

aral, to web
@aral@mastodon.ar.al avatar

Here’s a niche gotcha with the clipboard API’s navigator.clipboard.writeText() method that’s unique to Safari:

If you access a function from a module within your gesture handler (e.g., click handler), you will get a permission error.

The (sadly hacky and not as robust) workaround is to set a global variable from your module instead.

Full gist:

https://codeberg.org/aral/gists/src/branch/main/clipboard-writetext-permission-error-when-using-modules-in-safari.md

vanilla, to programming
@vanilla@social.spicyweb.dev avatar

Last month's exclusive video at The Spicy Web demonstrating a CodePen example of Signals—what they are, how they work, and why frontend frameworks and fans of vanilla alike are adopting them rapid-fire—is now available to view for free! Check it out:

https://www.spicyweb.dev/videos/2024/signals-are-eating-the-web/

eikun_0903, to javascript Japanese
@eikun_0903@fedibird.com avatar
vanilla, to webdev
@vanilla@social.spicyweb.dev avatar

New video out on The Spicy Web! 🌶️

Here be a fresh (and tingly!) take on reaching for #HTML-first tools like htmx, Turbo, Unpoly, etc. and why you might just want to (spoiler alert!) go vanilla. 🍦 After all, we have so many great browser-native APIs at our disposal now! #JavaScript #WebDev

Sign in or sign up via Intuitive+ to watch:
https://www.spicyweb.dev/videos/2024/ajax-back-in-action/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Youngstown
  • everett
  • slotface
  • rosin
  • osvaldo12
  • mdbf
  • ngwrru68w68
  • JUstTest
  • cubers
  • modclub
  • normalnudes
  • tester
  • khanakhh
  • Durango
  • ethstaker
  • tacticalgear
  • Leos
  • provamag3
  • anitta
  • cisconetworking
  • lostlight
  • All magazines