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

@kzkymur/sequencer

v1.0.4

Published

Simple Headless Dependency-Free Sequencer Library for JavaScript/TypeScript.

Readme

🎛️ @kzkymur/sequencer - Precision Timeline Orchestration

License: MIT npm version Test Coverage

Demo Page is Here

A professional-grade TypeScript library for precise sequencing and timeline orchestration. Perfect for animations, audio sequencing, robotic control, and any time-based operations requiring millisecond precision.

graph TD
  A[Sequencer] --> B[Queue Mode]
  A --> C[Independent Mode]
  B --> D[Linear Execution]
  C --> E[Parallel Execution]
  D --> F[Video Editing]
  E --> G[Game Events]
  D --> H[Presentation Tools]
  E --> I[IoT Automation]

🌟 Why Choose Sequencer?

  • Military-Grade Precision
    Engineered for sub-millisecond accuracy with Web Worker timers
  • Dual Mode Architecture
    Choose between linear queue sequencing or parallel event execution
  • Visual Debugging
    Built-in Canvas visualization tools for timeline monitoring
  • Enterprise Ready
    Full TypeScript support and 95% test coverage

🚀 Getting Started

Installation

npm install @kzkymur/sequencer

Basic Usage

import { Sequencer, Fragment } from '@kzkymur/sequencer';

// Create a pulsating light sequence
const lightShow = new Sequencer(
  100,  // pitch 
  1.0,  // speed
  true  // loop-frag
);

lightShow.push(new Fragment('Red Pulse', 500, () => setLEDColor('#ff0000')));
lightShow.push(new Fragment('Blue Pulse', 500, () => setLEDColor('#0000ff')));

// Start the light show
lightShow.play();

🧩 Core Concepts

Queue Mode (Linear Sequencing)

const presentation = new Sequencer(
  50,     // pitch 
  1.0,    // speed
  false   // loop-frag
);

presentation.push(new Fragment('Slide 1', 3000, showSlide1));
presentation.push(new Fragment('Transition', 500, playTransitionSound));
presentation.push(new Fragment('Slide 2', 4000, showSlide2));

presentation.play();

Independent Mode (Parallel Events)

const gameEvents = new IndependentSequencer(
  16.67,  // pitch 
  1.0,    // speed
  false   // loop-frag
);

// Parallel events with different start points
gameEvents.push(new IndependentFragment('Enemy AI', 1000, 0, updateAI));
gameEvents.push(new IndependentFragment('Physics', 16.67, 0, updatePhysics));
gameEvents.push(new IndependentFragment('Music', 5000, 250, playBackgroundScore));

gameEvents.play();

Custom Fragments (Modular Sequencing)

// Create complex animation sequence
const introAnimation = new CustomFragment('Intro', 0);
introAnimation.add(new IndependentFragment('Fade In', 1000, 0, fadeInLogo));
introAnimation.add(new IndependentFragment('Bounce', 500, 1000, animateBounce));

// Use like regular fragment
const mainSequence = new IndependentSequencer(
  16.67,  // pitch 
  1.0,    // speed
);
mainSequence.push(introAnimation);
mainSequence.play();

📚 Full API Reference

Fragment Classes

| Class | Description | Unique Features | |---------------------|------------------------------------------|-------------------------------| | Fragment | Base timeline unit | Linear execution | | IndependentFragment| Parallel execution fragment | Start point positioning | | CustomFragment | Group multiple fragments | Nested sequencing |

Sequencer Methods

class Sequencer {
  constructor(pitch: number, speed: number, loop: boolean);
  
  // Core controls
  play(delay?: number): void;
  stop(delay?: number): void;
  replay(delay?: number): void;
  
  // Fragment management
  push(fragment: Fragment): void;
  remove(fragment: Fragment): void;
  insert(index: number, fragment: Fragment): void;
  
  // Visualization
  renderToCanvas(ctx: CanvasRenderingContext2D, options: RenderOptions): void;
}

🎨 Visualization Guide

// Set up Canvas visualization
const canvas = document.getElementById('timeline-view');
const ctx = canvas.getContext('2d');

sequencer.renderToCanvas(ctx, {
  width: 800,
  height: 100,
  timeScale: 1.0,
  colorScheme: {
    active: '#4CAF50',
    upcoming: '#2196F3',
    completed: '#9E9E9E'
  }
});

🛠️ Development Setup

git clone https://github.com/kzkymur/sequencer.git
cd sequencer
npm install
npm run dev

🤝 Contributing

We welcome contributions! Please follow these guidelines:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes with semantic messages (feat: add new fragment type)
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📜 License

Distributed under the MIT License. See LICENSE for more information.

💡 Real-World Applications

  • Robotic arm control sequences
  • Interactive museum exhibits
  • Live performance lighting systems
  • Automated video editing pipelines
  • Industrial process automation

⚠️ Troubleshooting

Q: My callbacks aren't firing at expected times
A: Ensure your pitch value divides evenly into fragment durations

Q: Visualizations appear choppy
A: Match the render loop to your screen refresh rate (typically 60Hz = 16.67ms pitch)