UNPKG

recoder-code

Version:

🚀 AI-powered development platform - Chat with 32+ models, build projects, automate workflows. Free models included!

12 lines (11 loc) • 494 B
import { CLIENT_SUPPORTED_ALGORITHMS, PRIORITY_ORDER_ALGORITHMS } from "./types"; export const getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => { const validChecksumAlgorithms = []; for (const algorithm of PRIORITY_ORDER_ALGORITHMS) { if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) { continue; } validChecksumAlgorithms.push(algorithm); } return validChecksumAlgorithms; };