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

@feedlog-ai/core

v0.0.7

Published

Core SDK for Feedlog Toolkit

Readme

@feedlog-ai/core

Core SDK package providing shared utilities, types, and functionality used across all Feedlog Toolkit packages.

Features

  • TypeScript-based SDK: Fully typed for better developer experience
  • Shared types and interfaces: Consistent type definitions across packages
  • Utility functions: HTML sanitization and other utilities
  • Core Feedlog SDK class: Main API client for interacting with Feedlog services
  • Error handling: Comprehensive error types and handling
  • Pagination support: Built-in support for paginated API responses

Installation

npm install @feedlog-ai/core

Usage

Initializing the SDK

import { FeedlogSDK } from '@feedlog-ai/core';

// Initialize with required configuration
const sdk = new FeedlogSDK({
  apiKey: 'your-api-key', // Required: API key for authentication
});

// Or initialize with custom configuration
const customSdk = new FeedlogSDK({
  apiKey: 'your-api-key', // Required: API key for authentication
  endpoint: 'https://api.feedlog.app', // Custom API endpoint (optional)
  timeout: 30000, // Request timeout in milliseconds (optional)
  credentials: 'include', // Fetch credentials mode (optional)
});

Fetching Issues

// Fetch issues with default parameters
const response = await sdk.fetchIssues();

// Fetch issues with filters
const filteredResponse = await sdk.fetchIssues({
  type: 'bug', // 'bug' or 'enhancement'
  limit: 20, // Maximum number of issues (1-100)
  cursor: 'next-page-cursor', // For pagination
});

// Fetch issues from specific repositories
const repoResponse = await sdk.fetchIssues({
  repositoryIds: ['repo-id-1', 'repo-id-2'], // Array of repository IDs
  type: 'enhancement',
  limit: 10,
});

Upvoting Issues

// Toggle upvote on an issue
const upvoteResult = await sdk.toggleUpvote('issue-id');

console.log(upvoteResult.upvoted); // true if upvoted, false if unvoted
console.log(upvoteResult.upvoteCount); // Updated upvote count
console.log(upvoteResult.anonymousUserId); // User's anonymous ID

API Reference

FeedlogSDK

The main SDK class for interacting with the Feedlog API.

Constructor

new FeedlogSDK(config: FeedlogSDKConfig)

Methods

  • fetchIssues(params?: FetchIssuesParams): Promise<FetchIssuesResponse>
  • toggleUpvote(issueId: string): Promise<UpvoteResponse>
  • getEndpoint(): string - Get current API endpoint
  • getTimeout(): number - Get current timeout setting

Types

Core Types

  • FeedlogIssue - GitHub issue data structure
  • Repository - Repository information
  • FetchIssuesParams - Parameters for fetching issues
  • FetchIssuesResponse - Response from fetching issues
  • UpvoteResponse - Response from upvoting an issue
  • FeedlogSDKConfig - SDK configuration options

Error Types

  • FeedlogError - Base error class
  • FeedlogNetworkError - Network-related errors
  • FeedlogTimeoutError - Timeout errors
  • FeedlogValidationError - Validation errors

Utilities

  • sanitizeHtml(html: string): string - Sanitize HTML content to prevent XSS

Error Handling

The SDK provides specific error types for different failure scenarios:

import {
  FeedlogError,
  FeedlogNetworkError,
  FeedlogTimeoutError,
  FeedlogValidationError,
} from '@feedlog-ai/core';

try {
  const issues = await sdk.fetchIssues();
} catch (error) {
  if (error instanceof FeedlogNetworkError) {
    console.error('Network error:', error.statusCode);
  } else if (error instanceof FeedlogTimeoutError) {
    console.error('Request timed out');
  } else if (error instanceof FeedlogValidationError) {
    console.error('Validation error:', error.message);
  } else if (error instanceof FeedlogError) {
    console.error('Feedlog error:', error.message);
  }
}

Requirements

  • Node.js >= 22.0.0
  • TypeScript >= 5.3.3 (for type definitions)

License

MIT