- Sweden
-
08:57
(UTC +01:00)
Pinned Loading
-
family-bets
family-bets PublicA site I built to assist my friends' and family's betting on the World Cup.
JavaScript
-
-
Filter out keys and or values in an ...
Filter out keys and or values in an object 1/**
2* Description
3* @param {Object} obj
4* @param {function} keyFilter
5* @param {function} valueFilter
-
svgColorBoxes
svgColorBoxes 1function svgColorSwatches(colors, size = 64, vertical = false) {
2let svg = vertical
3? `<svg width="${size}" height="${colors.length * size}" viewBox="0 0 ${size} ${colors.length * size}" fill="none" xmlns="http://www.w3.org/2000/svg">`
4: `<svg width="${colors.length * size}" height="${size}" viewBox="0 0 ${colors.length * size} ${size}" fill="none" xmlns="http://www.w3.org/2000/svg">`;
5let x = 0, y = 0;
-
Turn an object to an array of one-ke...
Turn an object to an array of one-key-objects 1/**
2* Description Splits out all keys from an object and returns them as separate objects with single key/value pairs
3* @param {Object} obj
4* @returns {Array}
5*/
-
groupByMulti
groupByMulti 1type GroupByMulti = (list: any[], paths: { [key: string]: string }) => any
2export const groupByMulti: GroupByMulti = (list, paths) => {
3return (
4list?.reduce((acc: { [key: string]: any }, row: any) => {
5Object.keys(paths).forEach((key) => {
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.