Web Tools #455 - CSS/HTML, JSON, Databases, Vue

Web Tools Weekly
WEB VERSION
Tools for Web Developers

Issue #455 • April 7, 2022

Advertisement
Retool is the Fast Way to Build an Interface for any Database
Custom dashboards, admin panels, CRUD apps—build any internal tool faster in Retool. Visually design apps that interface with any database or API. Switch to code nearly anywhere to customize how your apps look and work. With Retool, you ship more apps and move your business forward—all in less time.

Get Started For Free Today
Retool

If you've been coding JavaScript for some time, you may never have had the need to compare two arrays to see if they're equal. But if it comes up, what exactly does "equal" mean when you're talking about arrays?

With two strings, we know exactly what it means. But with an array, it could mean 'do they contain the same values?', or possibly 'do they contain the same values in the same order?'.

Whatever the case, doing a direct strict comparison of two arrays will not tell you if they're equal:

let myArray = ['a', 'b', 'c'],
    myArray2 = ['a', 'b', 'c'],
    myArray3 = myArray;

function compareFunc (a, b) {
  return a === b;
}

console.log(compareFunc(myArray, myArray2)); // false
console.log(compareFunc(myArray, myArray)); // true
console.log(compareFunc(myArray, myArray3)); // true

Notice the two arrays are exactly the same. They contain the same items and in the same order. But a strict comparison using triple-equals says they're not equal. The only way to get the comparison to work is to compare the same instance of an array to itself (as I did with the last two logs). So technically the comparison is asking if it's the same array in memory, not the same values.

That doesn't mean array comparison is fruitless. If you have a few hours to kill, here's a really old Stack Overflow thread with lots of different answers. If you're only concerned with simple arrays containing numbers and strings, probably the simplest way to compare them is to convert each array to a string and then compare those:

console.log(myArray.toString() === myArray2.toString());
// logs "true"

You can try both of the above code samples in this CodePen. The Stack Overflow thread includes a ton of complex answers that take a number of different factors into consideration including order of items, object comparison in general, and more.

As I mentioned, comparing arrays doesn't seem to be common in my experience, but it's interesting to see the different ways people attempt to solve the problem.

And as a final side point, there is an official proposal that's a few years old that attempts to add an array comparison method to the ECMAScript spec.
 

Now on to this week's tools!
 

 

CSS and HTML Tools

Retool is the Fast Way to Build an Interface for any Database
Custom dashboards, admin panels, CRUD apps—build any internal tool faster in Retool. Visually design apps that interface with any database or API. Switch to code nearly anywhere to customize how your apps look and work. With Retool, you ship more apps and move your business forward—all in less time. sponsored  

pppalette
A color palette generator to build palettes from a chosen or random color. You can also create cohesive palettes by means of various blending options.

Martian Mono
A monospace typeface family consisting of a variable font and 28 styles. Currently includes basic Latin, figures, punctuation, and essential symbols, with other features in the works.

Stylify
A library that generates utility-first CSS dynamically based on what you write. Interesting because the class names basically look almost exactly like real CSS, so this seems to be the next step for something like Tailwind.

datetime.tools
Online tool to Convert a date/time value to or from Unix, ISO 861, and a standard human-friendly format.

datetime.tools

details-utils
A suite of JavaScript utilities that adds more features to the HTML `details` element.

tailwindcss-animate
A Tailwind CSS plugin that lets you use classes like `animate-in fade-in zoom-in` to apply animations to elements.

Gradientos
Test how a selected gradient will appear on various elements displayed live on the page, with option to switch to dark mode.

HTML Shell
An online tool to generate a basic HTML template. Use various toggles and options to include or exclude various meta tags and other features.

Bamboo CSS
A classless CSS library that adds attractive default styles for all HTML elements. Useful to add simple styles to HTML landing pages or demos.

CSS Checker
CLI tool that checks your CSS for duplication and quickly finds diffs among CSS classes that have high similarity.

SingleFile
A browser extension available for most modern browsers that allows you to download an entire web page as a single HTML file.
 

JSON, Database, etc.

CSS Weekly Newsletter
Stay up-to-date with the latest trends in CSS by getting only relevant and valuable articles and tutorials directly into your inbox. Join more than 30,000 developers and designers and sign up today.   sponsored 

Animate SQL
Online tool to see visualizations of SQL queries. Choose an SQL keyword along with an animation duration and then use the "Visualize" button to see what how the selected keyword behaves.

Postico
A modern PostgreSQL client for Mac that provides an easy-to-use interface, making PostgreSQL more accessible for newcomers and experienced devs.

JSON Visio
A simple visualization tool and formatter for your JSON data with no forced structure. Paste your JSON and view it visually using various flow-chart formats.
 
JSON Visio

jless
A command-line JSON viewer for Mac and Linux designed for reading, exploring, and searching through JSON data.

dynamodump
Node CLI for backing up and restoring schema+data from DynamoDB tables.

SimpleKV
A simple, anonymous key-value store for quick tests and temporary demos. Data not accessed for 7 days will be deleted.

dasel
A tool built with Go that lets you select, put, and delete data from JSON, TOML, YAML, XML and CSV files, with support for conversion between formats.

Graphjin
A GraphQL to SQL compiler that lets you build APIs in minutes.

One Tooling
A collection of useful tools for developers, that work client-side (except where noted), including JSON formatters/converters, HTML to Markdown, base64 and URL encoding/decoding, and more.

graphql-request
A minimal GraphQL client for Node and the browser, for scripts or simple apps, that uses a Promise-based API and has TypeScript support.
 

Vue Tools

CSS Weekly Newsletter
Stay up-to-date with the latest trends in CSS by getting only relevant and valuable articles and tutorials directly into your inbox. Join more than 30,000 developers and designers and sign up today.   sponsored 

vue-typegen
A Vue tool that scans for .vue files and generate types for your Vue components.

unplugin-swc
A plugin that adds support for SWC (a popular Rust-based web compiler) for Vite and Rollup.

vue-agile
A carousel component for Vue that's responsive, touch-friendly, Nuxt.js SSR support, and no jQuery dependency.

vue-frag-plugin
A Webpack/Rollup/Vite plugin to use multiple root nodes in Vue 2 Single-file Components (SFCs).

FormKit
Vue library that provides a one-stop solution for high-end forms, featuring labels, help text, theming support, validation, form generation from JSON, accessibility, internationalization and more.
 
FormKit

vue-motion-one
Animation library for Vue 3 based on Motion One, the relatively new library based on the Web Animations API.

vue3-datatable
A basic data table component for Vue 3 written in TypeScript and using the Composition API with filter, search, pagination, etc.

unplugin-vue2-script-setup
A plugin for Vue 2 that allows you to use `script setup` for the Composition API, with support for Vite, Nuxt, Vue CLI, Webpack, esbuild, and more.

Vue Unused Components Checker
Vue tool to detect unused Vue components in your projects.

Vue InstantSearch
Lightning-fast search for Vue.js apps powered by Algolia.

vue-inter
Older project that provides a simple yet powerful 1kB internationalization library for Vue.
 

Commercial Tools and Classifieds

These are affiliate links, paid classifieds, and curated commercial apps (i.e. not free, not open source, limited free plan, etc).

Pigmnts - Browser extension to extract a color palette from an image.

Datawrapper – Embeddable charts, maps, and tables, free with attribution.

vscode.email – A brand new newsletter with tips & content for VS Code. ad 

DeckDeckGo – Web app to create presentations slides shareable as PWAs.

Notus – A premium Tailwind CSS design system and admin template. ad 

Belltastic – Pre-built components for adding web notifications to your app.

Magma Studio – A browser-based real-time art collaboration platform.
 

A Tweet for Thought

Shaun Hume shares an accurate representation of the roller coaster of learning to code (or learning new technology, really).

A Tweet for Thought
 

Send Me Your Tools!

Made something? Send links via Direct Message on Twitter @WebToolsWeekly (details here). No tutorials or articles, please. If you have any suggestions for improvement or corrections, feel free to reply to this email.
 

Before I Go...

I'm guessing most of you have traveled less in the last two years than you would have liked, so to make up for that, maybe you'll enjoy YSFlight, a flight simulator for Windows, Mac, and Linux "where anything is possible." And yes, they mean anything since the software also includes cars and boats.

Thanks to everyone for subscribing and reading!

Keep tooling,
Louis
@WebToolsWeekly

Support this newsletter:
PayPal.me  Patreon  /  GitHub Sponsors  E-Books  /  $5 Tip  /  $1 Tip

Older messages

Web Tools #454 - Array.at, React, Git/CLI, Uncats

Thursday, March 31, 2022

Web Tools Weekly WEB VERSION Issue #454 • March 31, 2022 Advertisement Mojeek: A Crawler-Index Search Engine Most alternative search engines just source results from Google or Bing, not Mojeek! We have

Web Tools #453 - IE11 to Edge, JS Utilities, SVG, React Native

Thursday, March 24, 2022

Web Tools Weekly WEB VERSION Issue #453 • March 24, 2022 Advertisement Choosing the Best WYSIWYG Editor for Styling Tables Tables are perfect for representing data and information in an organized way,

Web Tools #452 - JS One-liners, VS Code, Testing, Uncats

Thursday, March 17, 2022

Web Tools Weekly WEB VERSION Issue #452 • March 17, 2022 Advertisement The All-in-One Modern Data Platform You Need Get everything you need to combine, organize, and transform your data for analysis,

Web Tools #451 - CSS Tools, Databases, JSON, SVG

Thursday, March 10, 2022

Web Tools Weekly WEB VERSION Issue #451 • March 10, 2022 Advertisement Choosing the Best WYSIWYG Editor for Styling Tables Tables are perfect for representing data and information in an organized way,

Web Tools #450 - New MDN, Frameworks, Build, React

Thursday, March 3, 2022

Web Tools Weekly WEB VERSION Issue #450 • March 3, 2022 Advertisement How Modern Treasury Scaled Data Infrastructure Fast Modern Treasury, the payment operations provider, needed to replace their BI

You Might Also Like

Google Researcher Uncovers Zero-Click Exploit Targeting Android Devices

Saturday, January 11, 2025

THN Daily Updates Newsletter cover The Kubernetes Book: Navigate the world of Kubernetes with expertise , Second Edition ($39.99 Value) FREE for a Limited Time Containers transformed how we package and

📧 Working with LLMs in .NET using Microsoft.Extensions.AI

Saturday, January 11, 2025

​ Working with LLMs in .NET using Microsoft․Extensions․AI Read on: m​y website / Read time: 6 minutes The .NET Weekly is brought to you by: ​Transform your database performance with RavenDB​:

iOS Dev Weekly – Issue 694

Friday, January 10, 2025

Hopefully you won't see that much difference with receiving this issue, but it's ALL CHANGED behind the scenes! 😱 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Daily Coding Problem: Problem #1664 [Easy]

Friday, January 10, 2025

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Twitter. A permutation can be specified by an array P , where P[i] represents the

Spyglass Dispatch: The Case for a For-Profit OpenAI

Friday, January 10, 2025

RIP Venu • A More Political and Real Time Threads • An OpenAI Auction • Apple's Tough 2025 The Spyglass Dispatch is a newsletter sent on weekdays featuring links and commentary on timely topics

⌨️ 10 Mods to Improve Your Mechanical Keyboard — How to Set Up Quick Share on Windows

Friday, January 10, 2025

Also: Why Are Tech Companies Trying to Sell Me Expensive Clocks? How-To Geek Logo January 10, 2025 Did You Know Famed biologist Charles Darwin and US President Abraham Lincoln were born on the same day

Your best friends in design

Friday, January 10, 2025

​ Working With Designers Product manager & UX designer collaboration guide. How members of your product team work together is just as important as the work itself. A fundamental relationship within

Charted | How Canada Would Rank as the 51st State 📊

Friday, January 10, 2025

Donald Trump has floated the idea that Canada should be the 51st state. Here's how it compares statistically. View Online | Subscribe | Download Our App Presented by: Global X ETFs Power AI's

Pinpointing The Actual Problem 🎯

Friday, January 10, 2025

WordPress accidentally diagnoses its own business problem. Here's a version for your browser. Hunting for the end of the long tail • January 10, 2025 Pinpointing The Actual Problem A blog post from

😱Major Azure Outage in EastUS2, 🚀New AI and Azure Developer CLI Courses, azureedge.net DNS retiring

Friday, January 10, 2025

͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏