packages/terafoundation/lib/api/index.js
function registerAPI(name, api) {
        if (Object.prototype.hasOwnProperty.call(context.apis, name)) {
            throw new Error(`Registration of API endpoints for module ${name} can only occur once`);
        } else {
            context.apis[name] = api;
        }
    }
function registerAPI(name, api) {
        if (Object.prototype.hasOwnProperty.call(context.apis, name)) {
            throw new Error(`Registration of API endpoints for module ${name} can only occur once`);
        } else {
            context.apis[name] = api;
        }
    }
function registerAPI ( name , api ) { if ( Object . prototype . hasOwnProperty . call ( context . apis , name ) ) { throw new Error ( ` ${ name } ` ) ; } else { context . apis [ name ] = api ; } }
/*
Used by modules to register API endpoints that can be used elsewhere
in the system.
@param {string} name - The module name being registered
@param {string} api - Object containing the functions being exposed as the API
/ * Used by modules to register API endpoints that can be used elsewhere in the system .