Full URI Escaper
This is a simple Node package to replace every character in a string with its URI-encoded equivalent. It can be used, for instance, to somewhat obfuscate query string parameters in a URI, for instance.
full-uri-escaper is designed to run both in the browser and in Node.
Usage Examples
Directly log escaped string
import fullURIEscaper from 'full-uri-escaper';
// Set `escaped` to
console.log( fullURIEscaper('Whatever you say, Mr. Boss-man!') );
Output:
%57%68%61%74%65%76%65%72%20%79%6f%75%20%73%61%79%2c%20%4d%72%2e%20%42%6f%73%73%2d%6d%61%6e%21
Get input from STDIN
import fullURIEscaper from 'full-uri-escaper';
// Request user input and set the STDIN to a variable so we can manipulate it
const stdin = fullURIEscaper.requestInput()
// End the STDIN on input, effectively only allowing one input
stdin.on('data', () => { stdin.end() });
Examples of STDOUT output:
From Command Line
npx full-uri-escaper "Whatever you say, Mr. Boss-man!"
full-uri-escaper "Whatever you say, Mr. Boss-man!"
Examples of CLI output: