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

@vosjs/timeline

v0.4.1

Published

Deterministic timeline math for video editing — keyframe sampling, GSAP-compatible pure easings, and source-time remapping (trim/split) for the vos programmatic video engine, evaluable identically on the host and inside running programs.

Readme

@vosjs/timeline

Deterministic time math for editable compositions: keyframe sampling, GSAP-compatible pure easings, and source-time remapping across trims, splits and speed changes.

npm License: MIT

Part of vos, the open programmatic video engine behind vos.so. This is an evaluation library, not a document format: apps embed its value types (keyframes, segments, speed spans) inside their own documents and evaluate them with the same functions on both sides of the player bridge. No DOM, no engine coupling, no random source, no wall clock, no dependencies. Every function is a pure function of its arguments, so seek(t) renders identically on the host and inside a running program.

Install

pnpm add @vosjs/timeline

What it does

  • Keyframe sampling. sample(track, t) interpolates a numeric KeyframeTrack at any time; sample(track, t, lerpArray) does the same for vector tracks. A keyframe's ease names the curve into it from the previous keyframe; interpolate: 'step' holds. sortKeyframes is the primitive underneath, and sample throws on an empty track.
  • GSAP-compatible easings. EASINGS and resolveEase(name) give pure easing functions under GSAP's names, including parameterized forms (back.out(1.7), elastic.inOut(1, 0.5), steps(5)), bare families (power2 means power2.out) and the css-bezier(x1, y1, x2, y2) dialect, so a recorded animation samples the curve its author saw. An unknown name resolves to linear rather than throwing.
  • Source-time remapping. A Segment is a kept span of source footage { in, out, rate? }, where rate is source seconds per output second. mapTime(segments, outputT) projects output time into source time, sourceToTimeline goes the other way (and returns null inside a cut), totalDuration and rateAt read the list, and splitBySpeed(segments, speedSpans) folds speed spans into rated segments. An empty list is the identity.
  • Segment edits. trimSegment, splitSegments, removeSegment and normalizeSegments edit a segment list with a MIN_SEGMENT_LENGTH floor of 0.05 s.

Two evaluation contexts

The same math runs host-side and inside a compiled program. The host imports from @vosjs/timeline; a render template inlines the runtime string from @vosjs/timeline/bundle, which defines globalThis.__vosTimeline with the evaluation subset: EASINGS, resolveEase, lerpArray, sample, mapTime, rateAt, sourceToTimeline, totalDuration. The edit helpers and splitBySpeed are host-only by design; a program receives already-rated segments as data.

// host
import { sample, mapTime, resolveEase } from '@vosjs/timeline'

const value = sample(track, t)
const sourceTime = mapTime(segments, outputTime)
const ease = resolveEase('power2.inOut')
// building a render template
import { timelineRuntimeCode } from '@vosjs/timeline/bundle'
// inline timelineRuntimeCode before the program; it reads __vosTimeline.sample(...)

Exports

sample, lerpArray, sortKeyframes, EASINGS, resolveEase, mapTime, sourceToTimeline, totalDuration, rateAt, segmentRate, splitBySpeed, trimSegment, splitSegments, removeSegment, normalizeSegments, MIN_SEGMENT_LENGTH; types Keyframe, KeyframeTrack, Segment, SpeedSpan, EaseName, EaseFn, Lerp. @vosjs/timeline/bundle exports timelineRuntimeCode.

License

MIT © vosso