Skip to content

ardatan/whatwg-node

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
November 27, 2023 17:42
July 20, 2022 15:25
November 27, 2023 18:41
November 27, 2023 18:41
July 14, 2023 11:28
October 25, 2023 14:16
January 30, 2023 19:28
January 30, 2023 19:28
January 30, 2023 19:28
October 12, 2023 16:33
November 18, 2021 19:58
January 30, 2023 19:28
March 2, 2023 16:23
June 22, 2023 10:34
June 22, 2023 10:34
June 22, 2023 10:34

WhatWG Node

This repository contains a set of environment(Browser, Node.js, Deno, Cloudflare Workers, Bun, etc.) agnostic packages for the WhatWG standards.

Node.js currently is the only exception that doesn't fully support those standards so whatwg-node packages ponyfill the missing parts without modifying or monkey-patching the native global APIs like polyfills.

Polyfill patches the native parts of an environment while ponyfill just exports the “patched” stuff without touching the environment’s internals. We prefer pony filling because it prevents us from breaking other libraries and environmental functionalities. In case a ponyfill is imported in an environment that already has that API built in like newer Node.js, Cloudflare Workers, Bun, Deno or Browser, no ponyfills are added to your built application bundle. So you have a generic package that works in all environments.

Packages

@whatwg-node/fetch

A ponyfill package for the Fetch Standard.

@whatwg-node/events

A ponyfill package for the DOM Events Standard.

@whatwg-node/server

A platform-independent JavaScript HTTP server adapter implementation that uses the Fetch Standard to handle requests. The HTTP server implemented with this library can be used in any JS environment like Node.js, Deno, Cloudflare Workers, Bun, etc. For Node.js, it transpiles Node.js specific APIs to the standard ones, and for other environments, it uses the standard APIs directly. Even if your environment doesn't use Fetch API for the server implementation, you can still use fetch method to handle requests.

fetchache

A fetch wrapper that allows you to respect HTTP caching strategies on non-browser environments with a key-value cache implementation. It follows the HTTP Caching and Conditional Requests standards.

About

Helper packages to create platform agnostic applications and libraries without worrying about the lack of WHATWG support in Node.js

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published