Skip to content

Instantly share code, notes, and snippets.

View CarlosHdz7's full-sized avatar
🏠
Working from home

CarlosHdz7

🏠
Working from home
View GitHub Profile
@CarlosHdz7
CarlosHdz7 / filterArray.js
Created February 15, 2021 21:47 — forked from jherax/arrayFilterFactory.1.ts
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
@CarlosHdz7
CarlosHdz7 / write-an-open-source-js-lib.md
Created August 13, 2020 20:32 — forked from oncode/write-an-open-source-js-lib.md
How to Write an Open Source JavaScript Library