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 🙏

© 2024 – Pkg Stats / Ryan Hefner

remiddy

v0.0.8

Published

[![Build Status](https://travis-ci.org/i-am-kenny/remiddy.svg?branch=master)](https://travis-ci.org/i-am-kenny/remiddy) [![codecov](https://codecov.io/gh/i-am-kenny/remiddy/branch/master/graph/badge.svg)](https://codecov.io/gh/i-am-kenny/remiddy) [![Known

Downloads

3

Readme

remiddy

Build Status codecov Known Vulnerabilities

Middleware for Remiddy. Inspired by the example middleware and projects like Recompose.

Better documentation is coming soon...

Middleware

General

  • withEnvironmentVariable
  • withSSM

API

Kinesis

  • withKinesisRecordFilter
  • withKinesisRecordMap
  • withKinesisStreamRecordCount

DynamoDb Stream

  • withDynamoDbDeleteRecordFilter
  • withDynamoDbInsertRecordFilter
  • withDynamoDbRecordFilter
  • withDynamoDbUpdateRecordFilter
  • withDynamodbUpsertRecordFilter
  • withUnmarshalledDynamoDbRecords

Examples

withAwsRegion

Adds the context.invokedFunctionArn to the response headers as x-aws-region.

middy(...).use(withAwsRegion());
middy(...).use(withAwsRegion('x-aws-region')); // optionally rename the header

withDefaultHttpEvent

Defaults queryStringParameters and pathParameters to {} if undefined or null;

middy(...).use(withDefaultHttpEvent());

withFunctionVersion

Adds the Lambda function version to the response headers as x-aws-function-version.

middy(...).use(withFunctionVersion());
middy(...).use(withFunctionVersion('x-aws-function-version')); // optionally rename the header

withHttpResponseHeader

Adds custom HTTP repsonse headers.

middy(...).use(withResponseHeader({
  'Access-Control-Allow-Origin': '*'
}));

middy(...).use(withResponseHeader((handler) => ({
  'x-custom-header': handler.event.value
})));

withJoiValidation

Allows validation (and conversion) of any event property; such as event.body, pathParameters, etc...

middy(...).use(withJoiValidation({
  queryStringParameters: {
    name: Joi.string().required(),
    year: Joi.number().required()
  }
});

withRequestId

Adds the context.awsRequestId to the response headers as x-aws-request-id.

middy(...).use(withRequestId());
middy(...).use(withRequestId('x-aws-request-id')); // optionally rename the header

withResponseTime

Adds "response-time" (ms) to the response headers as x-aws-response-time. Does not include the coldstart time, and is likely not accurate.

middy(...).use(withResponseTime());
middy(...).use(withResponseTime('x-aws-response-time')); // optionally rename the header

withWarmupHeader

Allows x-aws-warmup to be passed via request headers to immediately end execution with a 204 status.

middy(...).use(withWarmupHeader());
middy(...).use(withWarmupHeader('x-aws-warmup')); // optionally rename the header