MCPcopy
hub / github.com/prettier/prettier / constructor

Method constructor

src/language-html/parse/ast.js:19–32  ·  view source on GitHub ↗
(nodeOrProperties = {})

Source from the content-addressed store, hash-verified

17 parent;
18
19 constructor(nodeOrProperties = {}) {
20 for (const property of new Set([
21 ...NON_ENUMERABLE_PROPERTIES,
22 ...Object.keys(nodeOrProperties),
23 ])) {
24 this.setProperty(property, nodeOrProperties[property]);
25 }
26
27 if (isFrontMatter(nodeOrProperties)) {
28 for (const property of Object.getOwnPropertySymbols(nodeOrProperties)) {
29 this.setProperty(property, nodeOrProperties[property]);
30 }
31 }
32 }
33
34 setProperty(property, value) {
35 if (this[property] === value) {

Callers

nothing calls this directly

Calls 2

setPropertyMethod · 0.95
isFrontMatterFunction · 0.90

Tested by

no test coverage detected