consolidation

This commit is contained in:
overcuriousity
2025-07-25 15:48:04 +02:00
parent f21d5b33e3
commit 6e5ea011e0
3 changed files with 122 additions and 29 deletions

View File

@@ -66,26 +66,4 @@ export function getToolCategory(tool: Tool): 'concept' | 'method' | 'hosted' | '
if (isToolHosted(tool)) return 'hosted';
if (tool.license && tool.license !== 'Proprietary') return 'oss';
return 'proprietary';
}
// BROWSER COMPATIBILITY LAYER
// Only assign to window if we're in a browser environment
if (typeof window !== 'undefined') {
// Make functions available globally for existing code compatibility
window.createToolSlug = createToolSlug;
window.findToolByIdentifier = findToolByIdentifier;
window.isToolHosted = isToolHosted;
console.log('[toolHelpers] Consolidated tool utilities loaded and assigned to window');
}
// LEGACY NODE.JS COMPATIBILITY
// Support for older require() patterns if needed
if (typeof module !== 'undefined' && module.exports) {
module.exports = {
createToolSlug,
findToolByIdentifier,
isToolHosted,
getToolCategory
};
}