UNPKG

flowie

Version:

Library for creating, and working with flows

15 lines 780 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const immutable_1 = require("immutable"); function validateFlowieContainer(flow, flowieContainer) { const functionNames = flow.pipe || flow.split; const notRegisteredFunctions = immutable_1.Set(functionNames.filter(findNotRegisteredFunctions, flowieContainer)); if (!notRegisteredFunctions.size) return null; return new TypeError(`There is no functions registered on the container with this names: ${notRegisteredFunctions.join(', ')}`); } exports.default = validateFlowieContainer; function findNotRegisteredFunctions(functionName) { return typeof functionName === 'string' && !(functionName in this.functionsContainer); } //# sourceMappingURL=validateFlowieContainer.js.map