0.0.8 • Published 4 years ago
es-forwarded v0.0.8
es-forwarded
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