InDom.getValues(...args?)
Shortcut: $v

Returns a plain object with field names as keys and their getValue() results as values.
one call → all document field's values as JS object.
checkbox groups / multiple selects become arrays automatically
duplicate names in different forms / sections → add a container argument
dynamic fields (name_34, name_65) → auto-group under name:{'34':'Alice','65':'Bob'}

Parameters:
...args {string | string[] | InDom} (optional) - Field names (rest or array) or an InDom object as last arg to limit scope

Returns: {Object} - map of field names to their current values

Throws:
TypeError - If a given field name is not a non-empty string

Examples:
// every input/textarea/select field in document
let o = $v();
console.log(o);
//{"username":"Alice","message":"","color":"blue","size":["s","m"],"payment":null,
//"features":["wifi","gps"]...}

// every field inside first .input-examples
o = $v($1('.input-examples'));
console.log(o);
//{"username":"Alice","message":"","size":["s","m"],"payment":null,"features":[]...}

// only username + features (whole document)
o = $v('username','features');
console.log(o);
//{"username":"Alice","features":["wifi","gps"]}

// only username + features (inside first .input-examples)
o = $v('username','features',$1('.input-examples'));	
console.log(o);
//{"username":"Alice","features":[]}
// the same as $v(["username","features"],$1('.input-examples'));

<div>
	<input type="text" name="name_34" value=""><input type="text" name="age_34" value="">
div>
<div>
	<input type="text" name="name_65" value=""><input type="text" name="age_65" value="">
div>

// pick normal + grouped fields
o = $v('username','name_','age_');
console.log(o);
//{"username":"Alice","name":{"34":"Bob","65":"Carol"},"age":{"34":"28","65":"32"}}

// harvest all (default: group underscores)
o = $v();
console.log(o);
//{"username":"Alice","message":"",..."name":{"34":"Bob","65":"Carol"},
//"age":{"34":"28","65":"32"}}

// harvest all WITHOUT grouping
o = $v([]);
console.log(o);
//{"username":"Alice","message":"",..."name_34":"Bob","age_34":"28",
//"name_65":"Carol","age_65":"32"}
Modern DOM Power
for TypeScript, ESM & Plain JS
3.8KB JavaScript library that simplifies DOM manipulation
with a clean, chainable API for events, data, inputs harvesting, and more.
Automatic Cleanup,
Leak-Proof by Design
Events and state are cleared when elements leave the DOM,
even if removal happens outside InDom.
Cleaner Code,
Better Ergonomics
Get the InDom object directly in callbacks.
One element, one instance.
Works With Your Existing Stack
Use InDom on its own or alongside any library or framework,
its architecture ensures a seamless integration.