1.0.0 • Published 7 years ago
rfc5987-value-chars v1.0.0
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/Global_Objects/encodeURIComponent
1.0.0
7 years ago