JSPM

standardwebhooks

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1197454
  • Score
    100M100P100Q174969F
  • License MIT

Standard Webhooks for TypeScript

Package Exports

  • standardwebhooks
  • standardwebhooks/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (standardwebhooks) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Typescript/Javascript library for Standard Webhooks

Example

Verifying a webhook payload:

import { Webhook } from "standardwebhooks"

const wh = new Webhook(base64_secret);
wh.verify(webhook_payload, webhook_headers);

Development

Requirements

  • node
  • yarn

Building the library

yarn
yarn build

Contributing

Before opening a PR be sure to format your code!

yarn lint:fix

Running Tests

Simply run:

yarn test