Get started with javascript-hooker CDN

MIT licensed

Intercepts, modifies Node.js functions with JS-hooker library.

Tags:
  • patch
  • hook
  • function
  • debug
  • aop

Stable version

Copied!

How to start using javascript-hooker CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with javascript-hooker CDN - cdnhub.io</title>
    <script src="https://cdn.cdnhub.io/javascript-hooker/0.2.3/ba-hooker.min.js"></script>
</head>
<body>
    <button id="hook-button">Hook a function</button>

    <script>
      const hooker = new window.BaHooker();

      document.getElementById('hook-button').addEventListener('click', () => {
        hooker.hook(console, 'log', (original, args) => {
          console.log('[HOOKED] Original:', original);
          console.log('[HOOKED] Args:', args);
          original.apply(console, args);
        });
      });
    </script>
</body>
</html>
Copied!
Copied!

All versions