invisible-attachment

Attach and parse an invisible encoded number to any string by using invisible UTF8 characters

Usage no npm install needed!

<script type="module">
  import invisibleAttachment from 'https://cdn.skypack.dev/invisible-attachment';
</script>

README

invisible-attachment

build status coverage npm version license

Encode and attach any numeric value to a string by using invisible UTF8 characters.

Example

const { attach, extract } = require('invisible-attachment')

const attached = attach('this is an example', 1337)
// -> this is an example⠀⠀

const decoded = extract(attached)
// -> 1337

Usecase

Attaching additional metadata to strings in systems you don't control but want to build a beautiful client for :)

Imagine triggering client features by attaching invisible control commands to messages exchanged on a chat platform - while users without your client won't notice any difference in the exchanged messages.