Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: encode to hex #406

Open
VerlindenEAM opened this issue Feb 9, 2022 · 1 comment
Open

Request: encode to hex #406

VerlindenEAM opened this issue Feb 9, 2022 · 1 comment

Comments

@VerlindenEAM
Copy link

Would it be possible to get hex encoding helper?

We have some search related features using your Handlebars Helpers and it would be great to use the hex encoding in our URL mechanism.

For example:
"Analytics" would result in hex code "416e616c7974696373"
"Encode - Hex" would result in hex code "456e636f6465202d20486578"

var t = "Analytics"
var h = "";
for (let i=0; i<t.length; i++) {
h+= t.charCodeAt(i).toString(16);
}

console.log(t); // original text
console.log(h); // hex string

@BrinaD1
Copy link

BrinaD1 commented Jun 14, 2022

Agreed, adding a vote to this. Definitely needed for use with the PnP Search web parts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants