MCPcopy
hub / github.com/jsdoc/jsdoc / parseBorrows

Function parseBorrows

lib/jsdoc/tag/dictionary/definitions.js:168–188  ·  view source on GitHub ↗
(doclet, {text})

Source from the content-addressed store, hash-verified

166}
167
168function parseBorrows(doclet, {text}) {
169 const m = /^([\s\S]+?)(?:\s+as\s+([\s\S]+))?$/.exec(text);
170
171 if (m) {
172 if (m[1] && m[2]) {
173 return {
174 target: m[1],
175 source: m[2]
176 };
177 }
178 else if (m[1]) {
179 return {
180 target: m[1]
181 };
182 }
183
184 return {};
185 } else {
186 return {};
187 }
188}
189
190function stripModuleNamespace(name) {
191 return name.replace(/^module:/, '');

Callers 1

onTaggedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…