Skip to content

Instantly share code, notes, and snippets.

View evolmk's full-sized avatar

Mike evolmk

View GitHub Profile
@evolmk
evolmk / filterArray.js
Created July 8, 2020 20:34 — 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 => {
@evolmk
evolmk / updateNpm.bat
Created August 10, 2021 19:26 — forked from nokidding/updateNpm.bat
Windows batch file which updates npm for nvm-windows
rem see https://github.com/coreybutler/nvm-windows/issues/300
@echo off
SETLOCAL EnableDelayedExpansion
if [%1] == [] (
echo Pass in the version you would like to install, or "latest" to install the latest npm version.
) else (
set wanted_version=%1