Skip to content

Instantly share code, notes, and snippets.

View hervispichardo's full-sized avatar

Hervis Pichardo | designer and web developer hervispichardo

View GitHub Profile
@hervispichardo
hervispichardo / git-secure-merge-and-compare
Last active September 27, 2019 15:20
Git secure merge
git checkout feature_branch
git merge -s ours --no-commit master
git commit # Add a message regarding the replacement that you just did
git checkout master
git merge feature_branch
@hervispichardo
hervispichardo / multiFilter.js
Created May 23, 2018 20:59 — forked from jherax/filterArray.js
Filters an array of objects with multiple criteria.
/**
* Filters an array of objects with multiple criteria.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria as the property names
* @return {Array}
*/
function multiFilter(array, filters) {
const filterKeys = Object.keys(filters);
// filters all elements passing the criteria