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

@ariijs/lavalink-client

v3.0.0

Published

arii's extras for lavalink-client: stamped tracks, a reversible shuffle that survives any queue store, skip by position or title, a real previous(), and Deezer ARL pools. ESM and CommonJS.

Readme

@ariijs/lavalink-client

arii's extras for lavalink-client, as drop-in subclasses. ESM and CommonJS, typed.

  • every queued track is stamped with a random cid in its userData, so the same song queued twice is still two entries;
  • a reversible shuffle (toggleShuffle) that remembers the order and gives it back, with that state saved in the queue store, so a restored queue is still shuffled;
  • skip(position | title): skip to the third track, or to "the one that sounds like chandelier";
  • a previous() that goes back one track for real;
  • a Deezer ARL for each play: tracks from Deezer, Spotify and Apple Music (which LavaSrc plays through Deezer) get the ARL you pick as they start, in that request to Lavalink only, so an ARL never sits in a queue or its store, and your accounts can change at any time.

install

npm install lavalink-client @ariijs/lavalink-client

lavalink-client is a peer dependency (2.11 or newer).

usage

import { LavalinkManager } from "@ariijs/lavalink-client";
import type { Track } from "lavalink-client"; // types that this package doesn't redefine

const lavalink = new LavalinkManager({
  nodes: [{ id: "main", host: "127.0.0.1", port: 2333, authorization: "password" }],
  sendToShard: (guildId, payload) => client.guilds.cache.get(guildId)?.shard.send(payload),
  client: { id: client.user.id },
  // optional: the ARL a track plays with this time (null: Lavalink's own)
  deezer: { arlFor: async (track, player) => myAccounts.next() },
  // optional: play a track from a file you keep (Lavalink's local source) instead of its stream
  cache: { fileFor: async (track, player) => myFiles.encodedFor(track) },
});

const player = lavalink.createPlayer({ guildId, voiceChannelId, textChannelId });
await player.queue.add(tracks); // each track gets userData.cid
await player.queue.toggleShuffle(); // on; toggleShuffle() again turns it off and restores the order
await player.skip(3); // to the third of the next tracks
await player.skip("chandelier", { withAuthor: true }); // by similarity
await player.previous(); // back one track

Every class is a subclass of lavalink-client's, so everything else works as documented there. Typed userData:

interface MyData extends TrackUserData {
  requestedFrom: string;
}
const lavalink = new LavalinkManager<Player<MyData>>({ ... });

See CHANGELOG.md for what changed in 2.0.