Closed bcoe closed 3 years ago
I agree.
Given the general-purpose kind of nature of UUIDs I find it pretty challenging to come up with something that is both specific enough to serve as a helpful example but still general enough as to account for the universal nature of UUIDs. I will put some more thought into it.
Here's an example of how we would add an examples section:
<section>
<h2 id="examples">Examples</h2>
<p><em>This section is non-normative.</em></p>
<pre class="example" id="example-text-file" title="Generate unique name for download">
const filename = `${crypto.randomUUID()}.txt`;
// do something with wilename.
</pre>
</section>
A few other example ideas:
I think it would be worthwhile to add at least one non-normative example of the UUID API in action.
The kv-storage spec has some great examples we could use for inspiration.