1.0.2 • Published 5 years ago

invisible-attachment v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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.