JSPM

@andrewlevada/send-beacon

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q21840F
  • License MIT

Beacon API for nodejs

Package Exports

  • @andrewlevada/send-beacon
  • @andrewlevada/send-beacon/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 (@andrewlevada/send-beacon) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Beacon API for Node.js

The Beacon API is used to send an asynchronous and non-blocking request to a web server. The request does not expect a response.

Usage

// This will prevent Node.js process from exit for 3 seconds
const http = require('http')
http.get('https://timeout.now.sh/3000')
// Fire and forget, Node.js process exit immediately
const sendBeacon = require('send-beacon')
sendBeacon('https://timeout.now.sh/3000')