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 🙏

© 2025 – Pkg Stats / Ryan Hefner

appwrite-function-utils

v0.5.0

Published

This repository contains a set of utilities for Appwrite functions.

Readme

Appwrite Function Utils

This repository contains a set of utilities for Appwrite functions.

Installation

npm install --save appwrite-function-utils

Features

Function Handler Types

Enabled type checking for your function handler by using the Function type.

JavaScript

/** type {import('appwrite-function-utils').Function} */
const handler = async (context) => {
  // Your function code
}

export default handler

TypeScript

import { Function } from 'appwrite-function-utils'

const handler: Function = async (context) => {
  // Your function code
}

export default handler

Router

The router function allows you to easily define routes for your function handler.

import { router, HttpMethod } from 'appwrite-function-utils'

export default router({
  routes: [
    {
      path: '/ping',
      methods: [HttpMethod.GET, HttpMethod.POST],
      handler: async (context) => {
        return context.res.send('Pong!')
      },
    },
  ],
  // override the default exception handler routes
  exception: {
    notFound: async (context) => {
      return context.res.send('Oopsy whoopsy doopsy no findy windy', 404)
    },
  },
})

Dev Server

The appwrite-function-utils dev command will start a local server that will listen for incoming requests and execute your function handler. Assuming your function handler is located in src/main.js, add the following script to your package.json file:

{
  "scripts": {
    "dev": "appwrite-function-utils dev src/main.js"
  }
}

You can use it in conjuction nodemon to automatically restart the server when you make changes to your function handler:

npm install --save-dev nodemon
{
  "scripts": {
    "dev": "nodemon --watch src --exec \"appwrite-function-utils dev src/main.js\""
  }
}