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

voltar-wrapper

v1.0.1

Published

A TypeScript wrapper for the Voltar API

Readme

Voltar API Wrapper

A TypeScript wrapper for the Voltar API, providing easy access to URL bypassing functionality with support for both synchronous and asynchronous operations.

Installation

npm install voltar-wrapper

Usage

import { Voltar } from 'voltar-wrapper';

// Initialize with your API key
const voltar = new Voltar('your-api-key-here');

// Bypass a URL (synchronous method)
const result = await voltar.bypass('https://example.com/shortlink');

// Bypass a URL with async processing (recommended for potentially slow URLs)
const asyncResult = await voltar.bypassAsync('https://example.com/shortlink');

// Get supported services
const services = await voltar.services();

API Reference

new Voltar(apiKey)

Creates a new Voltar API client instance.

  • apiKey (string): Your Voltar API key

bypass(url, cache?)

Bypasses a URL using the synchronous Voltar API endpoint.

  • url (string): The URL to bypass
  • cache (boolean, optional): Whether to use cached results. Defaults to true
  • Returns: Promise with bypass result
  • Note: May timeout for URLs that take a long time to process

bypassAsync(url, cache?, pollingInterval?, timeout?)

Bypasses a URL using the asynchronous task-based approach. Recommended for URLs that might take a long time to process.

  • url (string): The URL to bypass
  • cache (boolean, optional): Whether to use cached results. Defaults to true
  • pollingInterval (number, optional): Time in ms between status checks. Defaults to 1000ms
  • timeout (number, optional): Maximum time in ms to wait for completion. Defaults to 60000ms (1 minute)
  • Returns: Promise with the bypass result

createTask(url, cache?)

Creates an asynchronous bypass task.

  • url (string): The URL to bypass
  • cache (boolean, optional): Whether to use cached results. Defaults to true
  • Returns: Promise with the task creation result containing a taskId

getTaskResult(taskId)

Get the result of an asynchronous bypass task.

  • taskId (string): The ID of the task to check
  • Returns: Promise with the task result

services()

Gets a list of supported services.

  • Returns: Promise with list of supported services categorized by type

Example Usage

TypeScript

// examples/example.ts
import { Voltar } from 'voltar-wrapper';

// Initialize with your API key
const voltar = new Voltar('your-api-key-here');

async function run(): Promise<void> {
  try {
    // Synchronous bypass (may timeout for slow URLs)
    console.log('Attempting synchronous bypass...');
    try {
      const bypass = await voltar.bypass('https://linkvertise.com/1239053/delta-executor1');
      console.log('Bypass result:', bypass);
    } catch (error) {
      console.log('Synchronous bypass may have timed out, trying async method...');
    }
    
    // Asynchronous bypass (recommended for potentially slow URLs)
    console.log('\nPerforming asynchronous bypass...');
    const asyncBypass = await voltar.bypassAsync('https://linkvertise.com/1239053/delta-executor1');
    console.log('Async bypass result:', asyncBypass);
    
    // Get supported services
    console.log('\nGetting supported services...');
    const services = await voltar.services();
    console.log('Services:', services);
    
  } catch (error) {
    if (error instanceof Error) {
      console.error('Error:', error.message);
    }
  }
}

// Run the example
run();

JavaScript

// examples/example.js
const { Voltar } = require('voltar-wrapper');

// Initialize with your API key
const voltar = new Voltar('your-api-key-here');

async function run() {
  try {
    // Synchronous bypass (may timeout for slow URLs)
    console.log('Attempting synchronous bypass...');
    try {
      const bypass = await voltar.bypass('https://linkvertise.com/1239053/delta-executor1');
      console.log('Bypass result:', bypass);
    } catch (error) {
      console.log('Synchronous bypass may have timed out, trying async method...');
    }
    
    // Asynchronous bypass (recommended for potentially slow URLs)
    console.log('\nPerforming asynchronous bypass...');
    const asyncBypass = await voltar.bypassAsync('https://linkvertise.com/1239053/delta-executor1');
    console.log('Async bypass result:', asyncBypass);
    
    // Get supported services
    console.log('\nGetting supported services...');
    const services = await voltar.services();
    console.log('Services:', services);
    
  } catch (error) {
    console.error('Error:', error.message);
  }
} 

// Run the Example
run();

Advanced Usage: Manual Task Management

If you need more control over the task lifecycle:

// Create a bypass task
const taskCreation = await voltar.createTask('https://example.com/shortlink');
const taskId = taskCreation.taskId;

// Check the task status periodically
let isComplete = false;
while (!isComplete) {
  const taskResult = await voltar.getTaskResult(taskId);
  
  if (taskResult.status !== 'processing') {
    isComplete = true;
    console.log('Final result:', taskResult);
  } else {
    console.log('Still processing...');
    await new Promise(resolve => setTimeout(resolve, 1000));
  }
}

License

MIT