MCPcopy
hub / github.com/webpack/webpack / cloneAttrs

Function cloneAttrs

lib/html/syntax.js:4685–4694  ·  view source on GitHub ↗
(/** @type {HtmlAttribute[]} */ attributes)

Source from the content-addressed store, hash-verified

4683 // serializer name) but drop source offsets so the consumer doesn't emit a
4684 // duplicate dependency for the reopened element's spans.
4685 const cloneAttrs = (/** @type {HtmlAttribute[]} */ attributes) =>
4686 attributes.map((a) => ({
4687 name: a.name,
4688 value: a.value,
4689 serializedName: a.serializedName,
4690 nameStart: -1,
4691 nameEnd: -1,
4692 valueStart: -1,
4693 valueEnd: -1
4694 }));
4695
4696 /**
4697 * @param {HtmlElement | HtmlDocument | HtmlDocumentFragment} parent container

Callers 2

reconstructAfeFunction · 0.85
adoptionAgencyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected