UNPKG

@mbakgun/n8n-nodes-slack-socket-mode

Version:

Slack Socket Mode Node for n8n that allows you to use +100 Slack events in your n8n instance with proxy mode

22 lines (21 loc) 646 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound // Used to compute insertion index to keep queue sorted after insertion function lowerBound(array, value, comparator) { let first = 0; let count = array.length; while (count > 0) { const step = (count / 2) | 0; let it = first + step; if (comparator(array[it], value) <= 0) { first = ++it; count -= step + 1; } else { count = step; } } return first; } exports.default = lowerBound;