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

Function newInstance

validator/js/nodejs/index.js:329–331  ·  view source on GitHub ↗

* Provided the contents of the validator_wasm.js file, e.g. as downloaded from * 'https://cdn.ampproject.org/v0/validator_wasm.js', returns a new validator * instance. The tradeoff between this function and getInstance() is that this * function is synchronous but requires the contents of the vali

(validatorJsContents)

Source from the content-addressed store, hash-verified

327 * @export
328 */
329function newInstance(validatorJsContents) {
330 return new Validator(validatorJsContents);
331}
332exports.newInstance = newInstance;
333
334// A note on emitting output to the console and process exit status:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected