Revert "pick now accepts lookup tables, with alternate cycle squeezing behaviour as new inhabit function" (#920)

This commit is contained in:
Alex McLean 2024-01-18 17:04:26 +00:00 committed by GitHub
parent 873a412179
commit a8db707440
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 50 additions and 250 deletions

View file

@ -316,10 +316,3 @@ export function hash2code(hash) {
return base64ToUnicode(decodeURIComponent(hash));
//return atob(decodeURIComponent(codeParam || ''));
}
export function objectMap(obj, fn) {
if (Array.isArray(obj)) {
return obj.map(fn);
}
return Object.fromEntries(Object.entries(obj).map(([k, v], i) => [k, fn(v, k, i)]));
}