function emitReadable_(stream) { debug('emit readable'); stream.emit('readable'); flow(stream); }
function pipeOnDrain(src) { return function() { var state = src._readableState; debug('pipeOnDrain', state.awaitDrain); if (state.awaitDrain) state.awaitDrain--; if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { state.flowing = true; flow(src); } }; }
async debug(execPath, args, options) { options = options || {}; const debugId = options.data || String(++this._lastDebugId); if (!options.data) this._lastStarted = {execPath, args, debugId, isProfiling: !!this._finishProfiling}; return this._service.debug( execPath, args, { ...options, data: debugId, cwd: Ndb.processInfo.cwd }); }
action.conditions.forEach((condition) => { const conditionVerified = compare(condition.operator, scope[condition.variable], condition.value); if (conditionVerified) { oneConditionVerified = true; } else { logger.debug( `Condition not verified. Condition = ${scope[condition.variable]} ${condition.operator} ${condition.value}`, ); } });
/** * @description Heal Zwave network * @example * zwave.healNetwork(); */ function healNetwork() { if (!this.connected) { throw new ServiceNotConfiguredError('ZWAVE_DRIVER_NOT_RUNNING'); } logger.debug(`Zwave : Heal network.`); this.zwave.healNetwork(); }
function getFileMatches( inputFiles ) { return inputFiles.map( ( inputFile ) => { debug( 'Parsing inputFile: ' + inputFile ); const relativeInputFilePath = path.relative( __dirname, inputFile ).replace( /^[/.]+/, '' ); return parser.getMatches( fs.readFileSync( inputFile, 'utf8' ) ).map( ( match ) => { match.line = relativeInputFilePath + ':' + match.line; return match; } ); } ); }
/** * @description TurnOff a given deviceFeature. * @param {Object} device - The device to turnOff. * @param {Object} deviceFeature - The deviceFeature to turnOff. * @example * light.turnOff(device, deviceFeature); */ async function turnOff(device, deviceFeature) { logger.debug(`Turning off the light of deviceFeature "${deviceFeature.selector}"`); await this.deviceManager.setValue(device, deviceFeature, STATE.OFF); this.eventManager.emit(EVENTS.LIGHT.TURNED_OFF, { device, deviceFeature }); }
/** * @description Add node * @param {boolean} secure - Secure node. * @example * zwave.addNode(true); */ function addNode(secure = false) { logger.debug(`Zwave : Entering inclusion mode`); this.zwave.addNode(secure); setTimeout(this.cancelControllerCommand.bind(this), ADD_NODE_TIMEOUT); }
// Upgrade to "access all users blogs" mode wpcom.request( { metaAPI: { accessAllUsersBlogs: true }, }, function ( error ) { if ( error ) { throw error; } debug( 'Proxy now running in "access all user\'s blogs" mode' ); } );
/** * @description Disconnect telegram API * @example * disconnect(); */ async function disconnect() { logger.debug('Disconnecting Telegram API'); if (this.bot) { await this.bot.stopPolling(); } this.bot = null; }
uninstall() { debug( 'stopping cookie watcher' ); clearInterval( this.cookieWatcherInterval ); this.cookieWatcherInterval = null; // TODO: // unregisterTranslateHook( this.translationFilter ); this.installed = false; return this; }
stop() { debug( 'Translation Scanner stopped' ); this.active = false; return this; }
/** * @description Add node * @example * zwave.removeNode(); */ function removeNode() { logger.debug(`Zwave : Entering exclusion mode`); this.zwave.removeNode(); setTimeout(this.cancelControllerCommand.bind(this), REMOVE_NODE_TIMEOUT); }
/** * @description When a node event is received. * @param {number} nodeId - The ID of the node. * @param {Object} data - The event. * @example * zwave.on('node event', this.nodeEvent); */ function nodeEvent(nodeId, data) { logger.debug(`Zwave : Node Event, nodeId = ${nodeId}, data = ${data}`); }
/** * @description Add node * @param {boolean} secure - Secure node. * @example * zwave.addNode(true); */ function addNode(secure = false) { logger.debug(`Zwave : Entering inclusion mode`); this.zwave.addNode(secure); setTimeout(this.cancelControllerCommand.bind(this), ADD_NODE_TIMEOUT); }