From 544e32e0f8876bd7de514dc5ec6d35fdb401b044 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 16 Apr 2022 10:02:35 +0100 Subject: [PATCH] add 'constant' --- packages/core/util.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/util.mjs b/packages/core/util.mjs index 2de7a8e6..5ec88125 100644 --- a/packages/core/util.mjs +++ b/packages/core/util.mjs @@ -60,6 +60,7 @@ export const removeUndefineds = (xs) => xs.filter((x) => x != undefined); export const flatten = (arr) => [].concat(...arr); export const id = (a) => a; +export const constant = (a, b) => a; export const listRange = (min, max) => Array.from({ length: max - min + 1 }, (_, i) => i + min);