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

@binary-brawlers/filebase-vue

v0.1.1

Published

Vue 3 integration for [FileBase](https://github.com/binary-brawlers/filebase).

Readme

@binary-brawlers/filebase-vue

Vue 3 integration for FileBase.

Status: Early preview. This package currently re-exports FileBaseClient from @binary-brawlers/filebase-client so Vue users can install a single package and start uploading today. Composition-API composables (useFileBaseUpload) and components (<FileBaseUpload>, <FileBaseDropzone>) are tracked on the FileBase roadmap and will land in a future minor release without breaking the current API.

Install

npm install @binary-brawlers/filebase-vue

Peer dependency: vue >= 3.

Setup

You need a sign endpoint on your backend (see @binary-brawlers/filebase-node or @binary-brawlers/filebase-next) that returns a signed upload session. The Vue app calls that endpoint — never the FileBase API directly.

Today: use FileBaseClient

<script setup lang="ts">
import { ref } from "vue";
import { FileBaseClient, FileBaseError } from "@binary-brawlers/filebase-vue";

const client = new FileBaseClient({ signEndpoint: "/api/upload/sign" });
const isUploading = ref(false);
const progress = ref(0);
const url = ref<string | null>(null);
const error = ref<string | null>(null);

async function onChange(event: Event) {
  const file = (event.target as HTMLInputElement).files?.[0];
  if (!file) return;
  isUploading.value = true;
  error.value = null;
  try {
    const result = await client.upload(file, {
      preset: "profile_images",
      onProgress: (p) => {
        progress.value = Math.round((p.fraction ?? 0) * 100);
      },
    });
    url.value = result.url;
  } catch (e) {
    error.value = e instanceof FileBaseError ? e.code : "upload failed";
  } finally {
    isUploading.value = false;
  }
}
</script>

<template>
  <div>
    <input type="file" :disabled="isUploading" @change="onChange" />
    <p v-if="isUploading">Uploading… {{ progress }}%</p>
    <p v-if="error" class="error">{{ error }}</p>
    <a v-if="url" :href="url">{{ url }}</a>
  </div>
</template>

Wrap as a composable

A minimal useUpload is a few lines of Composition API on top of the client:

// composables/useUpload.ts
import { reactive } from "vue";
import { FileBaseClient, FileBaseError } from "@binary-brawlers/filebase-vue";

export function useUpload(options: { signEndpoint: string; preset?: string }) {
  const client = new FileBaseClient({ signEndpoint: options.signEndpoint });
  const state = reactive({
    isUploading: false,
    progress: 0,
    error: null as string | null,
    url: null as string | null,
  });

  async function upload(file: File) {
    state.isUploading = true;
    state.error = null;
    try {
      const result = await client.upload(file, {
        preset: options.preset,
        onProgress: (p) => (state.progress = Math.round((p.fraction ?? 0) * 100)),
      });
      state.url = result.url;
      return result;
    } catch (e) {
      state.error = e instanceof FileBaseError ? e.code : "upload failed";
    } finally {
      state.isUploading = false;
    }
  }

  return { state, upload };
}

The first-party composables and components will follow the same shape so you can swap them in later.

License

MIT