Articles tagged in: Node.js



GitHub Actions — Run on Pull Request

GitHub Actions have different triggers. You can run an action when pushing code to a repository, or when creating a new tag. When building open source packages, you may receive pull requests from users. Typically, you want to run your test suite against the changed code in the pull request. …

Continue Reading

Add Seconds to a Date in Node.js and JavaScript

While building the queuing feature in the Supercharge framework, we wanted to enqueue jobs with a delay. You can delay a job by a given number of seconds. Internally, Supercharge stores a notBefore date with the added delay seconds. This tutorial shows you how to add seconds to a date …

Continue Reading

Sort an Array of Integers in JavaScript and Node.js

Sorting data is a common task in programming. JavaScript provides a .sort(comparator) method on arrays allowing you to sort data with custom comparator. A comparator represents a compare function determining which element comes before the other. When sorting integers, a custom compare function comes handy because you can ensure …

Continue Reading

Node.js — How to Merge Objects

Merging objects in JavaScript is a common task. For example, when starting an application you may load multiple configuration files and merge them into a single configuration object. This tutorial shows you how to merge objects in JavaScript. {{outline}} Merge Objects Merging objects in JavaScript is possible in different ways. …

Continue Reading
Page 1 of 25

Explore the Library

Find interesting tutorials and solutions for your problems.