Dynamic audio level indicator

This commit is contained in:
Fedor Indutny 2022-05-18 20:28:51 -07:00 committed by GitHub
parent ac59dec5aa
commit e6223b6a11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 323 additions and 123 deletions

View file

@ -24,3 +24,24 @@ export const groupBy = <T, ResultT>(
},
new Map<ResultT, Array<T>>()
);
export const isEqual = <K, V>(
left: ReadonlyMap<K, V>,
right: ReadonlyMap<K, V>
): boolean => {
if (left.size !== right.size) {
return false;
}
for (const [key, value] of left) {
if (!right.has(key)) {
return false;
}
if (right.get(key) !== value) {
return false;
}
}
return true;
};