Programming With Swift
  • Home
  • About
  • Github
Sign in Subscribe

Node

A collection of 3 posts
How to validate a URL with Node JS
Node

How to validate a URL with Node JS

Recently I needed to validate http links with Node. I thought this should be easy, and it is. Luckily for us, Node has a built in URL module that can help us to this. This is the snippet(not the final one): const URL = require('url').URL // 1
17 May 2022 2 min read
How to pretty-print JSON with JavaScript
JavaScript

How to pretty-print JSON with JavaScript

In this tutorial I will show you how you can pretty print a JSON string. It is a one liner, but it makes all the difference. Normally when we use JSON.stringify, we only want to serialise a JSON object, but sometimes after we serialise it, we might want to
29 Aug 2021 1 min read
How to Read and Write JSON with NodeJS
Node

How to Read and Write JSON with NodeJS

In this tutorial we will go over how read and write a JSON file with NodeJS. It should come at no surprise that Node makes working with JSON extremely easy, and with the built in fs module, reading and writing to the file system is equally easy. This tutorial is
29 Aug 2021 6 min read
Page 1 of 1
Programming With Swift © 2025
Powered by Ghost