fix: raw lens renderer download option uses direct arraybuffer binary value instead of text
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { pipe } from "fp-ts/function"
|
||||
import cloneDeep from "lodash/cloneDeep"
|
||||
import isEqual from "lodash/isEqual"
|
||||
|
||||
export const objRemoveKey =
|
||||
<T, K extends keyof T>(key: K) =>
|
||||
@@ -8,3 +9,12 @@ export const objRemoveKey =
|
||||
delete e[key]
|
||||
return e
|
||||
})
|
||||
|
||||
export const objFieldMatches =
|
||||
<T, K extends keyof T, V extends T[K]>(
|
||||
fieldName: K,
|
||||
matches: ReadonlyArray<V>
|
||||
) =>
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
(obj: T): obj is T & { [_ in K]: V } =>
|
||||
matches.findIndex((x) => isEqual(obj[fieldName], x)) !== -1
|
||||
|
||||
Reference in New Issue
Block a user