Skip to content

Instantly share code, notes, and snippets.

View iamgraeme's full-sized avatar

Graeme Houston iamgraeme

View GitHub Profile
@iamgraeme
iamgraeme / withNoBundleCompression.js
Created February 16, 2025 12:34 — forked from mrousavy/withNoBundleCompression.js
Expo Config Plugin to disable JS bundle compression for faster app startup
const {withAppBuildGradle} = require('@expo/config-plugins')
/**
* A Config Plugin to disable bundle compression in Android build.gradle.
* This makes the Android app start faster - in our tests by 400ms!
* @param {import('@expo/config-plugins').ConfigPlugin} config
* @returns {import('@expo/config-plugins').ConfigPlugin}
*/
module.exports = function withNoBundleCompression(config) {
return withAppBuildGradle(config, androidConfig => {
@iamgraeme
iamgraeme / filterArray.js
Created January 18, 2021 10:13 — 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 => {