UNPKG

@mikezimm/fps-core-v7

Version:

Library of reusable core interfaces, types and constants migrated from fps-library-v2

16 lines 845 B
import { getAbsoluteWebUrlFromSourceProps } from "../../../../../logic/Strings/getAbssoluteWebUrlFromSourceProps"; import { getThisFPSDigestValueFromUrl } from "./getThisFPSDigestValueFromUrl"; export async function addFPSDigestToSourceProps(sourceProps) { const absoluteUrl = getAbsoluteWebUrlFromSourceProps(sourceProps); const digestValue = await getThisFPSDigestValueFromUrl(absoluteUrl); /** * NOTE This line gives lint error: * Possible race condition: sourceProps.digestValue might be assigned based on an outdated state of sourceProps.eslintrequire-atomic-updates * * sourceProps.digestValue = digestValue; * * Solving by returning a newly merged object per chatGTP */ return { ...sourceProps, digestValue }; } //# sourceMappingURL=addFPSDigestToSourceProps.js.map