Skip to content

Instantly share code, notes, and snippets.

View leonardo-anjos's full-sized avatar
👨‍💻
Working from home

Leonardo Anjos leonardo-anjos

👨‍💻
Working from home
View GitHub Profile
@anabastos
anabastos / my_resume.gif
Last active March 14, 2025 17:20
my_resume.gif
my_resume.gif
@JamieMason
JamieMason / group-objects-by-property.md
Created September 14, 2018 07:38
Group Array of JavaScript Objects by Key or Property Value

Group Array of JavaScript Objects by Key or Property Value

Implementation

const groupBy = key => array =>
  array.reduce((objectsByKeyValue, obj) => {
    const value = obj[key];
    objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
    return objectsByKeyValue;
@parmentf
parmentf / GitCommitEmoji.md
Last active December 10, 2025 12:05
Git Commit message Emoji
@Yimiprod
Yimiprod / difference.js
Last active August 7, 2025 14:25
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {