UNPKG

@dtu-olp-2024/kafka-nocobase

Version:

A NocoBase plugin for Apache Kafka integration, supporting message publishing, topic management, and event-driven workflows. Built for the DTU GreenHope project.

8 lines (6 loc) 333 B
const BASE_URL = 'https://kafka.js.org' const stripLeading = char => str => (str.charAt(0) === char ? str.substring(1) : str) const stripLeadingSlash = stripLeading('/') const stripLeadingHash = stripLeading('#') module.exports = (path, hash) => `${BASE_URL}/${stripLeadingSlash(path)}${hash ? '#' + stripLeadingHash(hash) : ''}`