Skip to content

Instantly share code, notes, and snippets.

@delta94
delta94 / machine.js
Last active May 29, 2021 14:51
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@delta94
delta94 / filterArray.js
Created April 7, 2021 16:10 — forked from jherax/filterArray.js
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 => {

Keybase proof

I hereby claim:

  • I am delta94 on github.
  • I am delta94 (https://keybase.io/delta94) on keybase.
  • I have a public key ASDwb2imFrFroz4cbvD_Ib2zt6e2ei-A0s-yJSCHDk_02wo

To claim this, I am signing this object: