Skip to content

Instantly share code, notes, and snippets.

View avocadoslab's full-sized avatar
🖥️
In relationship with console.log();

Avocados Lab avocadoslab

🖥️
In relationship with console.log();
View GitHub Profile
@bkspace
bkspace / shopify-function-deploy.yml
Last active February 19, 2023 05:19
An example Github workflow file to deploy Shopify extensions/functions.
name: Function Deploy
on:
push:
branches:
- main
env:
SHOPIFY_API_KEY: ${{ secrets.SHOPIFY_API_KEY }}
SHOPIFY_FUNCTION_ID: ${{ secrets.SHOPIFY_FUNCTION_KEY }}
@jherax
jherax / filterArray.js
Last active May 6, 2024 09:35
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 => {