MCPcopy
hub / github.com/xaboy/form-create / use

Function use

packages/core/src/factory/node.js:73–85  ·  view source on GitHub ↗
(nodes)

Source from the content-addressed store, hash-verified

71 aliasMap[alias] = name;
72 },
73 use(nodes) {
74 Object.keys(nodes).forEach((k) => {
75 const line = toLine(k);
76 const lower = toString(k).toLocaleLowerCase();
77 const v = nodes[k];
78 CreateNode.alias(k, v);
79 [k, line, lower].forEach(n => {
80 CreateNode.prototype[n] = function (data, children) {
81 return this.make(aliasMap[k] || n, data, children);
82 };
83 });
84 });
85 }
86 })
87
88 return CreateNode;

Callers

nothing calls this directly

Calls 2

toLineFunction · 0.85
toStringFunction · 0.85

Tested by

no test coverage detected