🟢
Node.js Usage
Integrate NoBlocky into your Node.js applications for server-side adblock detection and testing.
📝 Basic Implementation
ES Modules
import { detectAdblock } from 'noblocky'; async function checkAdblock() { try { const result = await detectAdblock({ timeout: 5000, debug: true }); console.log('Detection result:', result); console.log('Adblock detected:', result.isBlocked); console.log('Confidence:', result.confidence); return result; } catch (error) { console.error('Detection failed:', error); throw error; } } checkAdblock();
CommonJS
const { detectAdblock } = require('noblocky'); async function checkAdblock() { const result = await detectAdblock(); console.log('Adblock status:', result.isBlocked); return result; } checkAdblock();
TypeScript
import { detectAdblock, type NoBlockyResult } from 'noblocky'; async function checkAdblock(): Promise<NoBlockyResult> { const result: NoBlockyResult = await detectAdblock({ timeout: 5000, debug: true }); return result; }
📦 Installation
npm
npm install @wildebeest-webtech/noblocky
yarn
yarn add @wildebeest-webtech/noblocky
pnpm
pnpm add @wildebeest-webtech/noblocky
⚙️ Advanced Configuration
For complete configuration options including custom detectors, callbacks, timeout settings, performance benchmarking, and advanced features, visit the advanced configuration page.
View Full Configuration API💡 Pro Tip
NoBlocky works in both browser and Node.js environments. Perfect for server-side rendering, testing, and API integrations!