MCPcopy Create free account
hub / github.com/ampproject/amphtml / getImportCode

Function getImportCode

build-system/compile/json-schema/index.js:152–158  ·  view source on GitHub ↗

* @param {Set } validatorFns * @return {string}

(validatorFns)

Source from the content-addressed store, hash-verified

150 * @return {string}
151 */
152function getImportCode(validatorFns) {
153 if (!validatorFns.size) {
154 return '';
155 }
156 const specifiers = Array.from(validatorFns).join(', ');
157 return `import {${specifiers}} from '#core/json-schema';\n\n`;
158}
159
160/**
161 * Transforms ajv's generated code to make it usable in a bundle:

Callers 1

ajvCompileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected