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

Function getValidateFactory

benchmark/validators/validate-one-of.js:32–41  ·  view source on GitHub ↗
(code, validLength)

Source from the content-addressed store, hash-verified

30];
31
32function getValidateFactory(code, validLength) {
33 const {
34 validateOneOf,
35 } = require('internal/validators');
36
37 switch (code) {
38 case 'validateOneOf':
39 return (n) => validateOneOf(n, 'n', validValues.slice(0, validLength));
40 }
41}
42
43function main({ n, code, validLength }) {
44 const validate = getValidateFactory(code, validLength);

Callers 1

mainFunction · 0.70

Calls 2

sliceMethod · 0.65
requireFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…