Skip to main content
Glama
index.js564 B
'use strict' const betterPathResolve = require('better-path-resolve') const path = require('path') function isSubdir (parentDir, subdir) { const rParent = `${betterPathResolve(parentDir)}${path.sep}` const rDir = `${betterPathResolve(subdir)}${path.sep}` return rDir.startsWith(rParent) } isSubdir.strict = function isSubdirStrict (parentDir, subdir) { const rParent = `${betterPathResolve(parentDir)}${path.sep}` const rDir = `${betterPathResolve(subdir)}${path.sep}` return rDir !== rParent && rDir.startsWith(rParent) } module.exports = isSubdir

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ajaystream/hubspot-mcp-custom'

If you have feedback or need assistance with the MCP directory API, please join our Discord server