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

mount-url

v1.0.3

Published

mount a file from a http url as a local file using fuse from the CLI

Readme

mount-url

mount a file from a http url as a local file using fuse from the CLI. uses http range requests and streaming.

NPM

installation

requires fuse. on mac you can brew install osxfuse

npm install -g mount-url

usage

mount-url <url>

will create a file in the current directory using the basename of the url. the file will appear like a normal file but will use http Range requests to support random access to the file

how it works

First we do a GET request to the URL provided, but abort it as soon as we have the headers. If the server doesn't return accept-ranges: bytes then mount-url won't work with this file and we abort (because we can't have random access to the file so it isn't worth it to mount as a fuse file).

Then we create a fuse directory in your os.tmpdir(), create a file in that directory, symlink a file in your process.cwd() to point to the tmp fuse mounted file, and then proxy requests for data to the file and convert them into HTTP range requests for the bytes that the fuse file requests.

This means you can mount a e.g. 10GB movie file, open VLC and skip to the middle of the movie and it can skip to the middle of the file without downloading the entire first half first (this is a contrived example as VLC already supports HTTP range requests).

JS API

first require it:

var mount = require('mount-url')

this returns a function that can be used to mount a url. it takes two arguments, a url and a callback. the callback will be called with err, cleanup. if there is an error, you don't have to cleanup. cleanup is a function that, if your file mounted successfully (e.g. if there was no err) you can call to unmount the file safely before exiting.

example

mount(someURL, function mounted (err, cleanup) {
  if (err) {
    console.error(err.message)
    process.exit(1)
  }
  process.on('SIGINT', function () {
    cleanup(function () {
      process.exit(1)
    })
  })
})