Home

JavaScript (Page 2)

10 Angular Tools to Build Creative Web Apps

To help the developers build robust and high-quality web apps, Angular offers plenty of useful tools.

Harikrishna Kundariya
Jun 30, 2022

Open External next/link Links in a New Tab

Add a component that dynamically swaps between next/link and a native anchor tag, and decides how to write the target attribute, all based on the href property.

Jun 30, 2022

Styling Placeholders for Select Fields

A (limited) CSS-only approach for styling placeholders, along with a way to work around the limitations with a custom JS-based solution.

Jun 16, 2022

Pro Tip: Simplify If Statements Using Exit Conditions

Exit clauses can help you write less code and make your code more readable. Here is a simple example, along with some additional tips.

May 24, 2022

Mapping Dynamic Object Keys in TypeScript

Dynamic property maps are a super powerful paradigm in JavaScript, but they can be tricky to type correctly with TypeScript.

May 20, 2022

Use Dynamic Property Maps over Switch Case Statements

An everyday JavaScript pattern to avoid clunky switch-case statements and unnecessary if conditionals.

May 19, 2022

Run JavaScript Script Before Another Script

Automatically run scripts with NPM/Yarn before or after another script.

May 09, 2022

Extract Twitter Handle from URL with JavaScript

Code snippet that extracts a Twitter user handle from a valid Twitter URL using JavaScript.

May 04, 2022

Convert Markdown Image to HTML in VS Code

Make a bulk conversion of markdown images to HTML strings using a regex find and replace with VS Code.

May 03, 2022

Extract GitHub Repo Name from URL using JavaScript

Quick JavaScript/Node snippet that can pul a GitHub repo path from a full GitHub URL.

Apr 20, 2022