MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / registerPeer

Function registerPeer

src/controller/factory.js:93–99  ·  view source on GitHub ↗
(type, contrConstructor)

Source from the content-addressed store, hash-verified

91}
92
93function registerPeer(type, contrConstructor) {
94 if (peerRepo.has(type)) {
95 throw new Error('Subcontroller class already registered.');
96 } else {
97 peerRepo.set(type, contrConstructor);
98 }
99}
100
101/**
102 * Verify if port is allowed to create controller

Callers 1

initFactoryFunction · 0.85

Calls 2

hasMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected