Make the submount function for the escort Object.

@param {Function} bind the bind function for the current escort Object.
@param {String} prefix the route prefix for the submount.
@api private

@example makeSubmountFunction("/forums")
437309
function (bind, prefix) {
        return function (path, callback) {
            var prefixedPath = prefix + path;
            validatePath(prefixedPath);
            var innerMethods = spawn(escort.prototype, {
                bind: function (routeName, route, descriptor) {
                    if (arguments.length === 2) {
                        descriptor = route;
                        route = routeName;
                        if (Array.isArray(route)) {
                            routeName = guessRouteName(prefixedPath + route[0]);
                        } else {
                            routeName = guessRouteName(prefixedPath + route);
                        }
                    }
                    return bind(routeName, route, descriptor, prefixedPath);
                },
                submount: makeSubmountFunction(bind, prefixedPath)
            });
            
            callback.call(innerMethods, innerMethods);
        };
    }
162796
function _processRoute(siteDesc, prefix, options) {
    options = options || {};
    //if (siteDesc.roles !== undefined && siteDesc.url !== undefined)
    //console.log('route', siteDesc.url, 'prefix', prefix);

    if (userHelper.hasRole(siteDesc.roles)) {
        let route = {
            roles: siteDesc.roles,
            name: prefix,
            route: siteDesc.url,
            regex: routeToRegExp(siteDesc.url),
            requiredParams: siteDesc.requiredParams
        };
        //Call the Backbone.history.handlers....
        //console.log('*****************');
        //console.log('ROute name: ',route.route);
        //console.log('Route handler name : ',  findRouteName(route.route.substring(1)));
        routes[findRouteName(route.route.substring(1))] = route;
        if (options.isInSiteStructure) {
            siteStructure[prefix] = route;
        }
    }
}
1361303
function bind(func, obj) {
        var slice = Array.prototype.slice;
        var args = slice.call(arguments, 2);
        return function () {
            return func.apply(obj, args.concat(slice.call(arguments)));
        };
    }
63415
def Tethering_bind(self, port):
		
		assert isinstance(port, (int,)
		    ), "Argument 'port' must be of type '['int']'. Received type: '%s'" % type(
		    port)
		subdom_funcs = self.synchronous_command('Tethering.bind', port=port)
		return subdom_funcs
1166394
function _bind(sAggregation, oControl, oBindingInfo) {
		var oBindingContext = this.getBindingContext();
		if (oBindingContext) {
			oBindingInfo.path = oBindingContext.getPath();
			oControl.bindAggregation(sAggregation, oBindingInfo);
		}
	}
573669
function applyBinds(fns, instance) {
        var i,
            current;

        for (i = fns.length - 1; i >= 0; i -= 1) {
            current = instance[fns[i]];
            instance[fns[i]] = bind(current, instance);
        }
    }
311097
function forOwnDeep(object, callback, prefix) {
    prefix = prefix ? prefix + '.' : '';

    _.forOwn(object, function(value, key) {
        if (_.isString(value)) {
            callback(value, prefix + key);
        } else {
            forOwnDeep(value, callback, prefix + key);
        }
    });
}
174688
function sub (subURI, callback) {
  var PING_TIMEOUT = process.env['PING_TIMEOUT']

  if (!subURI) {
    callback(new Error('uri is required'))
    return
  }
  var domain = subURI.split('/')[2]
  var wss = 'wss://' + domain + '/'

  var Socket = new ws(wss, {
    origin: 'http://websocket.org'
  })

  Socket.on('open', function open () {
    debug('connected')
    Socket.send('sub ' + subURI)

    if (PING_TIMEOUT && parseInt(PING_TIMEOUT) && parseInt(PING_TIMEOUT) > 0 ) {
      setInterval(function() {
        debug('sending ping')
        Socket.send('ping')
      }, parseInt(PING_TIMEOUT * 1000))
    }

  })

  Socket.on('close', function close () {
    debug('disconnected')
  })

  Socket.on('message', function message (data, flags) {
    debug(data)
    callback(null, data)
  })
}
1109531
function bind () {
    _inbox.bindSync(`tcp://0.0.0.0:${node.settings.coordinationPort}`)
    _inbox.on('message', _onInboxMessage)
    return resolver
  }
971104
def post_run_hook(self, func, prefix=None):
        
        cf = self.capture(func, prefix=prefix)
        self.post_run_hooks.append(cf)
        return cf
46661
function bindEvent ( namespacedEvent, callback ) {
            scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];
            scope_Events[namespacedEvent].push(callback);

            // If the event bound is 'update,' fire it immediately for all handles.
            if ( namespacedEvent.split('.')[0] === 'update' ) {
                scope_Handles.forEach(function(a, index){
                    fireEvent('update', index);
                });
            }
        }
1061507
function Binder(topology, logger) {
  assert.object(topology, 'connectionInfo');
  assert.object(logger, 'logger');

  /**
   * Ensures the topology is created for a route
   * @private
   * @param {Object} route - the route
   * @returns {Promise} a promise that is fulfilled with the resulting topology names after the topology has been created
   */
  const createTopology = (route) => {
    logger.silly(`Asserting topology for route ${route.name}`);
    return route.pattern.createTopology(topology, route.serviceDomainName, route.appName, route.name);
  };

  /**
   * Bind a publishing route to a consuming route
   *
   * @public
   * @method
   * @param {Object} publishingRoute - exchange route (required)
   * @param {Object} consumingRoute - consuming route (required)
   * @param {Object} options - binding configuration (required)
   * @param {String} options.pattern - routing pattern (ex: "#")
   * @returns {Promise} a promise that is fulfilled when the bind is finished
   */
  const bind = (publishingRoute, consumingRoute, options) => {
    let exchangeName;
    let queueName;

    return createTopology(publishingRoute)
    .then((topologyNames) => {
      exchangeName = topologyNames.exchangeName;
      return createTopology(consumingRoute);
    }).then((topologyNames) => {
      queueName = topologyNames.queueName;
      logger.info('Binding "' + exchangeName + '" to "' + queueName + '" with pattern "' + options.pattern + '"');
      return topology.createBinding({
        source: exchangeName,
        target: queueName,
        queue: true,
        keys: [options.pattern]
      });
    });
  };

  return { bind: bind };
}
940326
function proxy(func){
    'use strict';

    // Returns a middleware
    return function (kontx, next){
        func(kontx.args).then(
            function(payload){
                kontx.payload = payload;
                next();
            },
            function(err){
                next(err);
            }
        );
    };
}
1067087
function onMount( instance ) {
  store.activate( instance );
  listeners.bindKeys( _onKeyDown );
  listeners.bindClicks( _onClick );
  domHelpers.bindFocusables( instance, store.activate );
}
313579
function bind (obj, method) {
    var fn = obj[method];
    obj[method] = function () {
      fn.apply(obj, arguments);
    };
  }
513942
function withIdPrefix (state, prefix) {
  var emitter = new EventEmitter()

  var api = {
    add: require('./add').bind(null, state, prefix),
    find: require('./find').bind(null, state, prefix),
    findAll: require('./find-all').bind(null, state, prefix),
    findOrAdd: require('./find-or-add').bind(null, state, prefix),
    update: require('./update').bind(null, state, prefix),
    updateOrAdd: require('./update-or-add').bind(null, state, prefix),
    updateAll: require('./update-all').bind(null, state, prefix),
    remove: require('./remove').bind(null, state, prefix),
    removeAll: require('./remove-all').bind(null, state, prefix),
    withIdPrefix: function (moarPrefix) {
      return withIdPrefix(state, prefix + moarPrefix)
    }
  }

  var prefixState = {
    api: api,
    isListening: false,
    parentEmitter: state.emitter,
    emitter: emitter
  }

  api.on = require('./on').bind(null, prefixState)
  api.one = require('./one').bind(null, prefixState)
  api.off = require('./off').bind(null, prefixState)

  prefixEventHandler(prefix, prefixState)

  return api
}
71470
function bindDecorators (objectTemplate) {

    // TODO: In what situation would objectTemplate be null and why is it acceptable just to use this as a replacement?
    objectTemplate = objectTemplate || this;

    this.Amorphic = objectTemplate;
    this.amorphicStatic = objectTemplate;

    /**
     * Purpose unknown
     *
     * @param {unknown} target unknown
     * @param {unknown} props unknown
     *
     * @returns {unknown} unknown.
     */
    this.supertypeClass = function supertypeClass(target, props) {
        if (objectTemplate.supertypeClass) {
            return objectTemplate.supertypeClass(target, props, objectTemplate);
        }
        else {
            return SupertypeDefinition.supertypeClass(target, props, objectTemplate);
        }
    };

    /**
     * Purpose unknown
     *
     * @returns {unknown} unknown.
     */
    this.Supertype = function Supertype() {
        if (objectTemplate.Supertype) {
            return objectTemplate.Supertype.call(this, objectTemplate);
        }
        else {
            return SupertypeDefinition.Supertype.call(this, objectTemplate);
        }
    };
    this.Supertype.prototype = SupertypeDefinition.Supertype.prototype;

    /**
     *  Purpose unknown
     *
     * @param {unknown} props unknown
     *
     * @returns {unknown} unknown.
     */
    this.property = function property(props) {
        if (objectTemplate.property) {
            return objectTemplate.property(props, objectTemplate);
        }
        else {
            return SupertypeDefinition.property(props, objectTemplate);
        }
    };

    /**
     * Purpose unknown
     *
     * @param {unknown} defineProperty unknown
     *
     * @returns {unknown} unknown.
     */
    this.remote = function remote(defineProperty) {
        if (objectTemplate.remote) {
            return objectTemplate.remote(defineProperty, objectTemplate);
        }
        else {
            return SupertypeDefinition.remote(defineProperty, objectTemplate);
        }
    };

    /**
     * Purpose unknown
     *
     * @returns {unknown} unknown.
     */
    this.Amorphic.create = function create() {
        objectTemplate.connect = unitTestConfig.startup;

        return objectTemplate;
    };

    this.Amorphic.getInstance = function getInstance() {
        return objectTemplate;
    };
}