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

@syeedalireza/auction-guard

v1.0.0

Published

Professional reverse auction package

Downloads

60

Readme

@syeedalireza/auction-guard

A data-processing utility that analyzes bidding patterns to detect anomalies, fraud, and collusion in reverse auctions.

Architecture

classDiagram
    class AuctionGuard {
      +addStrategy(DetectionStrategy)
      +addBatchStrategy(BatchDetectionStrategy)
      +analyzeBid(bids, newBid)
      +analyzeBatch(bids)
    }
    class DetectionStrategy {
      <<interface>>
      +analyze(bids, newBid)
    }
    class BatchDetectionStrategy {
      <<interface>>
      +analyzeBatch(bids)
    }
    
    AuctionGuard --> DetectionStrategy
    AuctionGuard --> BatchDetectionStrategy
    
    DetectionStrategy <|-- RapidBiddingStrategy
    DetectionStrategy <|-- CollusionStrategy
    BatchDetectionStrategy <|-- HighVolumeBatchStrategy

Features

  • Strategy Pattern: Easily extensible architecture to add new detection rules.
  • Real-time Detection: Identifies bots or scripts placing too many bids in a short window (RapidBiddingStrategy) and alternating bid patterns (CollusionStrategy).
  • Batch Processing: Supports heavy, periodic analysis of the entire auction history (HighVolumeBatchStrategy).
  • Property-based Testing: Hardened against edge cases using fast-check.

Installation

npm install @syeedalireza/auction-guard lodash

Usage

import { 
  AuctionGuard, 
  RapidBiddingStrategy, 
  CollusionStrategy,
  HighVolumeBatchStrategy
} from '@syeedalireza/auction-guard';

// Initialize the guard
const guard = new AuctionGuard();

// Add real-time strategies
guard.addStrategy(new RapidBiddingStrategy(10, 60000)); // Max 10 bids per minute
guard.addStrategy(new CollusionStrategy(6, 300000)); // Look for 6 alternating bids in 5 mins

// Add batch strategies for cron jobs
guard.addBatchStrategy(new HighVolumeBatchStrategy(50)); // Max 50 bids per auction

// Current state of the auction
const existingBids = [
  // ... previous bids
];

// A new bid comes in
const newBid = {
  id: 'bid-123',
  bidderId: 'user-1',
  amount: 95,
  timestamp: Date.now()
};

// 1. Analyze in real-time
const realTimeReports = guard.analyzeBid(existingBids, newBid);

// 2. Analyze periodically (e.g., via a cron job)
const batchReports = guard.analyzeBatch([...existingBids, newBid]);

API

AuctionGuard

The main orchestrator.

  • addStrategy(strategy: DetectionStrategy): void
  • analyzeBid(bids: Bid[], newBid: Bid): AnomalyReport[]

RapidBiddingStrategy

Detects if a single user is bidding too frequently.

  • constructor(maxBidsPerMinute: number = 10, timeWindowMs: number = 60000)

CollusionStrategy

Detects if two users are taking turns bidding to manipulate the timer or price.

  • constructor(minSequenceLength: number = 6, timeWindowMs: number = 300000)

Types

interface Bid {
  id: string;
  bidderId: string;
  amount: number;
  timestamp: number;
}

interface AnomalyReport {
  isAnomalous: boolean;
  reason?: string;
  confidenceScore: number; // 0 to 1
}