Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rastapasta/invisible-attachment

🙈 Utilize invisible UTF8-characters to encode and attach any integer to a string without changing its visual appearance
https://github.com/rastapasta/invisible-attachment

invisible javascript magic metadata utf8

Last synced: 29 days ago
JSON representation

🙈 Utilize invisible UTF8-characters to encode and attach any integer to a string without changing its visual appearance

Awesome Lists containing this project

README

        

# invisible-attachment
[![build status](https://travis-ci.com/rastapasta/invisible-attachment.svg?token=ubbpW9so2rtnRSFNwzed&branch=master)](https://travis-ci.com/rastapasta/invisible-attachment) ![coverage](https://img.shields.io/badge/coverage-100%25-green.svg) [![npm version](https://badge.fury.io/js/invisible-attachment.svg)](https://www.npmjs.com/package/invisible-attachment) [![Greenkeeper badge](https://badges.greenkeeper.io/rastapasta/invisible-attachment.svg)](https://greenkeeper.io/) ![license](https://img.shields.io/github/license/rastapasta/invisible-attachment.svg)

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

## Example

```js
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.