UNPKG

@nodecg/json-schema-lib

Version:

Extensible JSON Schema library with support for multi-file schemas using $ref

16 lines (13 loc) 317 B
'use strict'; module.exports = filterByMethod; /** * Used to filter plugins that implement the specified method. * * @param {string} methodName * @returns {function} */ function filterByMethod (methodName) { return function methodFilter (plugin) { return typeof plugin[methodName] === 'function'; }; }