UNPKG

strict-uri-encode

Version:

A stricter URI encode adhering to RFC 3986

3 lines (2 loc) 138 B
'use strict'; module.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);