Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/rastapasta/invisible-attachment
- Owner: rastapasta
- License: mit
- Created: 2019-10-12T02:49:53.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T05:49:43.000Z (almost 2 years ago)
- Last Synced: 2024-09-14T09:37:54.164Z (about 2 months ago)
- Topics: invisible, javascript, magic, metadata, utf8
- Language: JavaScript
- Homepage:
- Size: 78.1 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.