4 ms·
The first one that showed was a wrapper on localstorage, not sure why we'd need one of those but anyhow I looked at the code, no update since 2018. I spend a lo
by mickael-kerjean 4y ago
The first one that showed was a wrapper on localstorage, not sure why we'd need one of those but anyhow I looked at the code, no update since 2018. I spend a lot of time at work trying to minimise the amount of unnecessary crap we pull from npm explaining people that gaining 2 minutes by npm install something might deserve us in the long run but that's a massive uphill battle. The leftpad is a great example especially since there's a standard function for it (padStart) but most frontend people I am in contact with ignore those standard and first start by npm install whatever is available
- capableweb 4y agoHere is 90% of all the wrapping you'll ever need over localStorage: function ls_get(k) { JSON.parse(localStorage.getItem(k)) } function ls_set(k, v) { localStorage.setItem(k, JSON.stringify(v)) }
- spyke112 4y agoMy current customer has a designer, who claimed that we used Lottie Script[0] for animations all over the site, and we needed an animation to nudge the user to change from portrait to landscape. The animation was rotating an svg, and changing opacity on some svg children. It could all be done in pure html/svg and css, but we almost ended up bloating our, already huge bundle with all this Lottie stuff. My colleague did not consider that the designer did not know what he was talking about. Luckily this was caught in a PR. [0] https://airbnb.io/lottie/#/ https://airbnb.io/lottie/#/