Marcus is a fullstack JS developer. He’s passionate about the hapi framework for Node.js and loves to build web apps and APIs. Creator of Futureflix and the “learn hapi” learning path.

Node.js — Calculate a SHA256 Hash

Node.js comes with a built-in crypto module and a bundled version of OpenSSL. The crypto module wraps OpenSSL providing an API for cryptographic functions. Node.js’ crypto module provides a createHash method allowing you to calculate hashes of given content. This tutorial shows you how to use the createHash …

Continue Reading

Node.js — Calculate an MD5 Hash

Node.js comes with the crypto module that provides a lot of useful methods for data encryption and hashing. There’s a built-in function to calculate an MD5 hash for a given value. This tutorial shows you how to hash a given string using the MD5 algorithm. {{outline}} Calculate an …

Continue Reading

JavaScript — How to Fix “Uncaught SyntaxError: Cannot use import statement outside a module”

JavaScript programs started small by being used here and there. Over time, the usage of JavaScript increased and we’re writing full applications that run in the browser. These large applications can be hard to maintain. It makes sense to think about ways of splitting them up into modules. Modern …

Continue Reading

JavaScript — How to Convert URLSearchParams to Object

Modern JavaScript ships with the dedicated URLSearchParams class to interact with URL query parameters. This class parses query parameters from a given string and provides methods to interact with the parameters. For example, you may append, delete, get, sort, or iterate through all items using the forEach, keys, or values …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.