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

functioneer-aws

v1.0.0

Published

AWS lambda helpers for functioneer.

Downloads

3

Readme

Functioneer-AWS

Helper functions for Functioneer - for use with AWS Lambda functions.

Installation

Run npm install i functioneer-aws and import to your project.

Usage

Declare a function:

import {Functioneer} from "functioneer";
const func = new Functioneer();
//Declare a function to add two numbers
func.registerFunction("add", "Adds two numbers", (a: number, b: number) => {
    return a + b;
})
.addField("a", "number", "The first number to add")
.addField("b", "number", "The second number to add");

Use the lambda handler for a path:

import { getLamdaHandler } from "./lib/functioneer-aws";
import { APIGatewayProxyEvent, APIGatewayProxyResult } from "aws-lambda";

export const lambdaHandler: (event: APIGatewayProxyEvent) => Promise<APIGatewayProxyResult> = getLamdaHandler(func,"BODY");

Exposed method

getLambdaHandler(functioneerInstance,dataSource,functionName?)

| arguement | type | | | ------------------- | ----------- | ------------------------------------------------------------------------------------- | | functioneerInstance | Functioneer | An instance of Functioneer | | dataSource | string | Where to get the function arguements from ("BODY" or "PARAMS" or "QUERY") | | functionName | string? | The function to be called. If null then select the function name from the data source |

Dynamic function selection

As mentioned before you can either hardcode the function to run or parse it through the dataSource:

const func = new Functioneer();
func.registerFunction("add", "Adds two numbers", (a: number, b: number) => { return a + b; }).
addField("a", "number", "The first number to add").
addField("b", "number", "The second number to add");


// This will run the add function
export const lambdaHandler: (event: APIGatewayProxyEvent) => Promise<APIGatewayProxyResult> = getLamdaHandler(func,"BODY", "add");

// This will run any function specified in body.functionName
export const lambdaHandler: (event: APIGatewayProxyEvent) => Promise<APIGatewayProxyResult> = getLamdaHandler(func,"BODY");

Data sources

The following data sources are supported:

| Data source | value | | | -------------- | -------- | --------------------------- | | Request body | "BODY" | JSON data from request body | | URL parameters | "PARAMS" | URL parameters | | Query string | "QUERY" | Query string parameters |

Building and testing

You can build the project by running npm run build. Tests are run by running npm run test

License

Functioneer-aws is licensed under MIT license