SNIPPETS

Short solutions to discrete problems which can be copied and pasted.

March 2, 2023Javascript
Object retrieve nested value

Retrieve the value at a specified path of a deeply nested object by traversing the object until it reaches the desired value.

February 21, 2023Javascript
Array min value

Find the minimum value in a collection of primitives or objects

February 13, 2023Javascript
Array to directories

Simplify the process of converting array of objects to directories alike using the keyBy function. This concise utility reduces the complexity involved and effortlessly generates a new object with the desired structure.

February 5, 2023Javascript
Array removal

How to efficiently remove elements from an array in 2023.

January 28, 2023Javascript
Array Flattening

An easy way to recursively flatten an array in JavaScript with only native JavaScript.

January 21, 2023Javascript
Array difference

Have you ever wondered how to find the difference between two arrays without a third party library?

January 14, 2023Javascript
Array Intersection

Have you ever dreamed of finding the intersecting values between arrays without a third party library?

November 13, 2022Javascript
Chunking

Similar to the _chunk method frum Lodash but with only native Javascript !

September 6, 2022Javascript
Random

Generate a random number from a range like we all wished Math.random worked.

October 26, 2022Javascript
Object filtering

Filtering objects as easily as arrays.

October 14, 2022Javascript
Destructuring

Add and conditionally override a property of an object.

September 7, 2022Javascript
Debounce

A classic debounce function, written in modern Javascript.

Invalid DateJavascript
Amount

Convert a number into a proper amount.