Description
Construct names from caller-supplied ASCII parts and controlled dash-removal, uppercase and reserved-name mutations, retaining current core flags without registering elements.
A protocol fixture is local test data representing headers, messages, identifiers, or request decisions. Serialization and parsing can be checked without contacting a server, while authentication, delivery, and actual client behavior require separate tests.
Construct names from caller-supplied ASCII parts and controlled dash-removal, uppercase and reserved-name mutations, retaining current core flags without registering elements.
When to use this tool
Use this generator to create reproducible custom element name fixture cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply prefixes, suffixes, modes, count in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read cases. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Preflight every prefix/suffix combination as a valid custom-element name, sample a combination, then keep it or remove its dash, uppercase the prefix, or replace it with a reserved name. Delegate the actual name check for each result.1
Delegated operations used for this result: custom element dash name requirement. Their calculation or parsing conventions apply to the corresponding result fields.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| prefixes | Prefixes | Required. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 32.; minimum items 1; maximum items 32. |
| suffixes | Suffixes | Required. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 32.; minimum items 1; maximum items 32. |
| modes | Modes | Required. Array of Text; one of "valid", "remove-dash", "uppercase", "reserved".; minimum items 1; maximum items 4. |
| count | Count | Required. Safe integer; minimum 1; maximum 32. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| cases | Cases | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 32. |
| cases[].prefix | Prefix | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 32. |
| cases[].suffix | Suffix | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 32. |
| cases[].original | Original | Required. Text; maximum UTF-16 length 256. |
| cases[].mode | Mode | Required. Text; one of "valid", "remove-dash", "uppercase", "reserved". |
| cases[].name | Name | Required. Text; maximum UTF-16 length 256. |
| cases[].check | Check | Required. Object; no unknown keys. |
| cases[].check.valid | Valid | Required. Boolean. |
| cases[].check.containsDash | Contains Dash | Required. Boolean. |
| cases[].check.reserved | Reserved | Required. Boolean. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"prefixes": [
"weather",
"news"
],
"suffixes": [
"panel",
"card"
],
"modes": [
"valid",
"remove-dash",
"uppercase",
"reserved"
],
"count": 1,
"seed": 42
},
"output": {
"cases": [
{
"prefix": "news",
"suffix": "panel",
"original": "news-panel",
"mode": "reserved",
"name": "font-face",
"check": {
"valid": false,
"containsDash": true,
"reserved": true
}
}
],
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- A named mutation need not always alter a spelling, so read the returned check. This tests the linked name rule and does not define, register, instantiate, or assess a browser custom element.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random CSS Custom Property Fallback Corpus Generator
Compose nested var fallback expressions and literal bindings, then lower their acyclic fallback paths to the supported core resolver.
- Random Barcode Label Sheet Generator
Generate seeded synthetic EAN-13 or UPC-A data under an optional digit prefix, delegate check digits and SVG symbols, and return bounded zero-based label-grid positions for an app-rendered sheet; optional uniqueness applies to identifiers, while assignment, physical scanner readiness, print layout and export are not claimed.