npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reclsdk/sdk

v1.0.4

Published

RECL JavaScript SDK — behavioral tracking and personalization

Readme

@reclsdk/sdk

Lightweight JavaScript SDK for RECL Customer Data Platform. Zero dependencies, <5KB gzipped.

Install

npm install @reclsdk/sdk

Quick Start

ES Modules / TypeScript

import { ReclSDK } from '@reclsdk/sdk';

const sdk = new ReclSDK();
sdk.init('YOUR_PUBLIC_API_KEY', {
  apiUrl: 'https://your-api.example.com',
});

sdk.track('page_view', { page: '/home' });
sdk.identify('user-123', { plan: 'pro' });

Script Tag (CDN)

<script>
  (function(w,d,s,l,i){w[l]=w[l]||function(){(w[l].q=w[l].q||[]).push(arguments)};
  var f=d.getElementsByTagName(s)[0],j=d.createElement(s);j.async=1;
  j.src=i;f.parentNode.insertBefore(j,f);
  })(window,document,'script','recl','https://cdn.example.com/recl.min.js');

  recl('init', 'YOUR_PUBLIC_API_KEY', { apiUrl: 'https://your-api.example.com' });
  recl('track', 'page_view');
</script>

CommonJS

const { ReclSDK } = require('@reclsdk/sdk');

API

sdk.init(apiKey, options?)

Initialize the SDK. Options:

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiUrl | string | '' | API endpoint URL | | batchSize | number | 10 | Events per batch | | batchInterval | number | 5000 | Batch flush interval (ms) | | autoTrack | boolean | true | Enable auto-tracking | | sessionTimeout | number | 1800000 | Session timeout (ms) | | debug | boolean | false | Enable debug logging | | requireConsent | boolean | false | Require consent before tracking | | identityStorage | 'localStorage' \| 'cookie' | 'localStorage' | Identity storage method |

sdk.track(eventType, properties?)

Track a custom event.

sdk.track('button_click', { button_id: 'cta-hero', variant: 'blue' });

sdk.identify(userId, traits?)

Link the current anonymous user to a known user ID.

sdk.identify('user-123', { email: '[email protected]', plan: 'pro' });

sdk.setGlobalProperties(properties)

Set properties attached to every subsequent event.

sdk.setGlobalProperties({ app_version: '2.1.0' });

sdk.flush()

Force-send all buffered events immediately.

sdk.reset()

Clear user identity and start a new anonymous session.

sdk.getUserId() / sdk.getAnonymousId() / sdk.getSessionId() / sdk.getDeviceId()

Get current identity values.

sdk.enable() / sdk.disable()

Enable or disable tracking.

sdk.grantConsent() / sdk.revokeConsent()

Manage GDPR consent. When requireConsent: true, events are only sent after grantConsent().

Auto-Tracking

When autoTrack: true (default), the SDK automatically captures:

  • page_view — on page load and SPA navigation
  • click — link and button clicks (supports data-recl-* attributes)
  • scroll_depth — max scroll percentage
  • time_on_page — active time before unload
  • element_visibility — elements with data-recl-track-visibility

HTML Attributes

<button data-recl-event="signup_click" data-recl-plan="pro">
  Sign Up
</button>

License

MIT