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

tickr-js

v0.1.2

Published

JavaScript client for Tickr.cc

Readme

Tickr.cc JavaScript Client

A JavaScript/TypeScript client library for interacting with the Tickr.cc API (counters service).


Features

  • Fetch all your counters (requires authentication)
  • Create a new counter (requires authentication)
  • Fetch a public counter by slug
  • Increment a counter (public or private, depending on API config)
  • Update a counter (requires authentication and ownership)
  • Delete a counter (requires authentication and ownership)
  • Supports API key authentication (recommended; JWT is deprecated)
  • Supports is_private and is_readonly counter properties
  • Fully typed with TypeScript definitions

Installation

npm install tickr-js
# or
yarn add tickr-js

Usage

import { TickrClient } from 'tickr-js';

// Create a client instance (API key is recommended for authenticated endpoints)
// You can get your API key from the Tickr API docs page: https://tickr.cc/api-docs
// Note: Pass the base URL first (default: https://tickr.cc), then the API Key.
const client = new TickrClient("YOUR_API_KEY");

// For public-only access, you can instantiate without arguments:
// const publicClient = new TickrClient();

async function main() {
  // Fetch all counters (authenticated)
  const counters = await client.getCounters();
  console.log(counters);

  // Create a new counter (authenticated, with privacy/read-only options)
  const newCounter = await client.createCounter({
    name: "My Counter",
    initial_value: 10,
    is_private: true,
    is_readonly: false
  });
  console.log("Created:", newCounter);

  // Fetch a public counter by slug
  const publicCounter = await client.getCounter("abc123xyz");
  console.log("Fetched:", publicCounter);

  // Increment a counter (public or private)
  const updatedCounter = await client.incrementCounter("abc123xyz", 2);
  console.log("Incremented:", updatedCounter);

  // Update a counter (authenticated, owner only)
  const updated = await client.updateCounter("abc123xyz", {
    name: "Renamed",
    current_value: 42,
    is_private: false
  });
  console.log("Updated:", updated);

  // Delete a counter (authenticated, owner only)
  await client.deleteCounter("abc123xyz");
  console.log("Deleted");
}

main();

Authentication

For authenticated endpoints, obtain an API key from your Tickr.cc dashboard and pass it to the client constructor. Public endpoints do not require authentication.

Note: JWT authentication is deprecated. Use API keys for all new integrations.

Counter Properties

  • is_private: If true, only authorized users can increment the counter.
  • is_readonly: If true, the counter cannot be incremented by anyone on the website, but can be incremented via the API.

These properties are always included in returned counter objects.

License

MIT