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

titan-recommendation-algorithm

v1.0.1

Published

A dynamic and configurable recommendation algorithm for personalized content.

Readme

Titan Recommendation Algorithm

The Titan Recommendation Algorithm is a powerful and flexible video recommendation system designed to generate personalized video feeds based on user preferences, behaviors, and interactions. This package leverages a modular design, worker threads, and a robust scoring system to deliver highly relevant content to users.

npm license downloads

Features

User-Centric Recommendations: Personalize feeds using user preferences, location, feedback, and interaction history. Dynamic Scoring: Calculate video relevance based on engagement, novelty, social proof, and more. Modular Configuration: Easily customize weights, thresholds, and scoring logic through the Config interface. Worker Threads: Efficiently process large datasets with asynchronous workers. Diversity Support: Promote diverse recommendations by penalizing overused tags or creators.

Installation

To install the package, use npm:

npm install titan-recommendation-algorithm

Usage

Generate a Personalized Feed

import { generateFeed } from 'titan-recommendation-algorithm'; 
import { UserPreferences, UserData, Video } from './types';

const userPreferences: UserPreferences = { 
  preferredTags: ['comedy', 'education'], 
  minDuration: 10, 
  maxDuration: 300, 
};

const userData: UserData = { 
  userLocation: 'New York', 
  rewatchedVideos: ['video1'], 
};

const videos: Video[] = [ 
  { 
    id: 'video1', 
    tags: ['comedy'], 
    duration: 120, 
    views: 1000, 
    engagementRate: 0.8, 
    uploadDate: '2023-12-01' 
  }, { 
    id: 'video2', 
    tags: ['sports'], 
    duration: 90, 
    views: 2000, 
    engagementRate: 0.6, 
    uploadDate: '2023-12-02' 
  }, 
];

generateFeed(
    userPreferences, 
    userData, 
    videos
  ).then((feed) => { 
      console.log(feed)
  }); // Outputs an array of sorted video IDs });

Update User Feedback

import { updateFeedback } from 'titan-recommendation-algorithm'; import { UserData } from './types';

const userData: UserData = { 
  rewatchedVideos: ['video1'], 
  feedback: { video1: 4 }, 
};

const updatedData = updateFeedback(userData, 'video2', 5); console.log(updatedData.feedback); // Outputs: { video1: 4, video2: 5 }

Adjust Configuration

import { updateConfig, getConfig } from 'titan-recommendation-algorithm';

updateConfig({ noveltyScoreWeight: 0.5 }); console.log(getConfig().noveltyScoreWeight); // Outputs: 0.5

Documentation

For detailed documentation on each function, interface, and configuration option, refer to the TSDoc comments in the source files.

Contributing

We welcome contributions! See the CONTRIBUTING.md file for more details.

License

This project is licensed under the MIT License. See the LICENSE file for details.