Skip to main content
Go to Latest
function collectInputById
import { collectInputById } from "https://deno.land/x/simple_utility@v2.0.1/mod.full.ts";

Find all input textarea elements with id attribute and convert them to key-value record.

Examples

Example 1

const dom = parseDOM("<input id='foo'><textarea id='bar'></textarea>");
const result = collectInputById(dom);

Returns

Record<string, string>