rfc5987-value-chars

RFC5987 value-chars encoding/decoding

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
rfc5987-value-chars
001.0.06 years ago6 years agoMinified + gzip package size for rfc5987-value-chars in KB

Readme

RFC5987 "value-chars" encode/decode
Great for HTTP header fields such as the "filename" of a "Content-Disposition".
Lightweight: 16 lines
const {encode, decode} = require('rfc5987-value-chars')

decode(encode(filename))

Largely inspired by examples at: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/GlobalObjects/encodeURIComponent