Node.JS and JavaScript

Node.JS allows JavaScript to be used as a server-side (back-end) programming language.

📖 Kb | 📎 Development | 🔖 JavaScript, ECMAscript

How to reliably detect the object type of a JavaScript variable?

The nature of JavaScript means that everything is treated as an object (sort of). It can be remarkably hard to reliably detect what type of object something is and there isn’t a single function in JavaScript that can be used in all cases. So how do we do it? Here are some options


📖 Kb | 📎 Development | 🔖 JavaScript, ECMAscript

How to take control of JavaScript console output

All browsers have the console object that lets you output to the developer console log. But in production, you don’t want this output, only in development. So here is the easiest way I’ve found to take control.


📖 Kb | 📎 Development | 🔖 JavaScript, ECMAscript, node.js, nodejs

What JavaScript versions are there and how do they map to Node.JS versions?

There are now far too many versions of JavaScript. Worse, there are several ways to refer to a JavaScript version. Then we have Node.JS which has its own versioning. This post tries to summarise it all.


📖 Kb | 📎 Development | 🔖 JavaScript, ECMAscript

How to loop over JavaScript arrays and objects

JavaScript can be a pain at times. Loops are a fundamental part of all computer languages but in JavaScript, there are some oddities. This post is a summary of the different loop features and when to use them. It is likely to be updated from time-to-time as the standards are still changing.

🕑
📖 Kb | 📎 Development | 🔖 node.js, nodejs, npm, json

Using npm configuration environment variables in package.json

npm automatically makes parts of your package.json file available as environment variables. This can be useful when using npm as a run script service.

🕑
📖 Kb | 📎 Development | 🔖 node.js, nodejs, JavaScript, ECMAscript

Download a GitHub Repository using Node.JS

Downloading a repository from GitHub using Node.JS should be really easy. But it isn’t! This KB post reminds us of the tricks required.

🕑
📖 Kb | 📎 Development | 🔖 JavaScript, ECMAscript

How to walk through a JavaScript object in sort order

Using a JavaScript object like a keyed array, what is the simplest way to walk through the object?


📖 Kb | 📎 Development | 🔖 JavaScript, ECMAscript

How to get the properties of a JavaScript object without errors

You cannot natively request chained properties of a JavaScript object without the possibility of an error. This utility function allows you to get any properties, no matter how they are nested.