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

@campaign-lite/landing-page-common

v1.0.1

Published

Common modules for landing pages

Readme

Landing Page Common

This package provides a library of common modules and utilities designed to be shared and imported across various landing page projects.

Installation

You can install this package into your other local projects or use it as a dependency once published.

npm install @campaign-lite/landing-page-common

Features

  • TypeScript Native: Built with TypeScript for full type safety.
  • ESM Support: Exports modern ES modules out of the box.
  • CampaignLite Client: Provides a client for interacting with the Campaign Lite API.

Usage

CampaignLite Client

The CampaignLite client is a wrapper for making authenticated requests to the Campaign Lite backend. It supports pagination, sorting, filtering, and bulk operations.

Initialization

import { CampaignLite } from "landing-page-common";

// Initialize with base URL
const client = new CampaignLite("https://api.campaignlite.app");

// Set the client name
client.client("qualfon");

// Set the endpoint path
client.endpoint("leads");

Authentication

You can authenticate the client using either Basic Auth or an API Key, depending on how the Campaign Lite endpoint is configured.

Basic Auth:

client.setBasicAuth("your-username", "your-password");

API Key:

client.setApiKey("your-api-key");

Fetching Data (GET)

The fetch method allows you to retrieve data with optional pagination, sorting, and filtering parameters.

const response = await client.fetch({
  page: 0,
  size: 50,
  sortBy: "createdAt",
  sortDirection: "desc",
  startAtField: "status",
  startAt: "active",
});

const data = await response.json();
console.log(data);

Pushing Data (POST)

The push method allows you to submit new records.

Single Record:

const response = await client.push({
  email: "[email protected]",
  name: "John Doe",
});

Bulk Insert:

const records = [
  { email: "[email protected]" },
  { email: "[email protected]" },
];

// Set the second parameter to true to enable the /bulk endpoint
const bulkResponse = await client.push(records, true);

Available Scripts

  • npm run build: Cleans the dist directory and compiles the TypeScript code.
  • npm run clean: Removes the dist directory.
  • npm test: Runs the Vitest test suite.
  • npm run test:coverage: Runs the test suite and generates a coverage report.
  • npm run lint: Lints the codebase using ESLint.
  • npm run lint:fix: Automatically fixes linting errors where possible.

License

ISC