Log nested objects in Node →
The default "recurse depth" of console.dir
is 2. This is rarely what I want.
The default "recurse depth" of console.dir
is 2. This is rarely what I want.
Faker is a useful JavaScript library for generating dummy data. For example, faker.random.words(3)
generates a string containing three random words. But what if you want to generate an array of random words?
There are countless blog posts detailing how to split a JavaScript array into chunks. However, many of these solutions fail with arrays containing hundreds of thousands of items.
You can generate a pseudo-random boolean in JavaScript or PHP using a single line of code. No, you do not need to install yet another idiotic JavaScript package.
Statecharts are a very useful tool for modelling complex workflows in your application.
TypeScript doesn't always play nicely with object bracket notation.
The Node CLI supports a "require" flag, which allows you to preload a module when running Node.
Node isn't managed by npm
. As such, there's no guarantee that running npm install -D @types/node
will install the correct type definitions for your version of Node.
Use 'generics' when writing a TypeScript function which works with a variety of types.
Many PHP module names include the PHP version. This makes it difficult to write portable bash scripts. Here's a fix.