MCPcopy Index your code
hub / github.com/nodejs/node / getValidateFactory

Function getValidateFactory

benchmark/validators/validate-boolean.js:19–28  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

17});
18
19function getValidateFactory(code) {
20 const {
21 validateBoolean,
22 } = require('internal/validators');
23
24 switch (code) {
25 case 'validateBoolean':
26 return (n) => validateBoolean(n, 'n');
27 }
28}
29
30function main({ n, code, value }) {
31 const validate = getValidateFactory(code);

Callers 1

mainFunction · 0.70

Calls 1

requireFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…