helpers / handlebars-helpers

188 handlebars helpers in ~20 categories. Can be used with Assemble, Ghost, YUI, express.js etc.
http://assemble.io/helpers/
MIT License
2.22k stars 365 forks source link

Request: encode to hex #406

Open VerlindenEAM opened 2 years ago

VerlindenEAM commented 2 years ago

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 commented 2 years ago

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