This package has been deprecated

Author message:

Use @tinyhttp/forwarded instead

es-forwarded
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

es-forwarded

Subscribe to twitter Top language Vulnerabilities Version Node Version Last commit

This is a copy of forwarded-parse package but with ESM and CommonJS targets.

Parse the Forwarded header (RFC 7239) into an array of objects.

Install

pnpm i es-forwarded

API

import { parse } from 'es-forwarded'

parse(text)

Parse the Forwarded header value into an array of objects.

Example

import { parse } from 'es-forwarded'

console.log(parse('for=198.51.100.17;by=203.0.113.60;proto=http;host=example.com'))

/*
[{
  for: '198.51.100.17',
  by: '203.0.113.60',
  proto: 'http',
  host: 'example.com'
}]
*/

License

MIT © v1rtl

Readme

Keywords

none

Package Sidebar

Install

npm i es-forwarded

Weekly Downloads

0

Version

0.0.8

License

MIT

Unpacked Size

15.7 kB

Total Files

9

Last publish

Collaborators

  • dropthebeatbro