invisible-attachment

1.0.2 • Public • Published

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.

Package Sidebar

Install

npm i invisible-attachment

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

5.97 kB

Total Files

6

Last publish

Collaborators

  • rastapasta