# secret-text

> Encode any string to non-printable symbols

Latest version **2.0.3** (published 2021-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install secret-text
pnpm add secret-text
yarn add secret-text
bun add secret-text
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2021-03-15 |
| First published | 2021-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | azzztec |
| Maintainers | azzztec |
| Keywords | string, hide, key, text, non-printable, encode, secret |

## Links

- npm: https://www.npmjs.com/package/secret-text
- Repository: https://github.com/azzztec/secret-text
- Homepage: https://github.com/azzztec/secret-text#readme
- Issues: https://github.com/azzztec/secret-text/issues
- npm.io page: https://npm.io/package/secret-text

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 2.0.3 (latest) — 2021-03-15
- 2.0.2 — 2021-02-06
- 2.0.1 — 2021-02-04
- 2.0.0 — 2021-02-04
- 1.0.4 — 2021-01-30
- 1.0.3 — 2021-01-30
- 1.0.2 — 2021-01-30
- 1.0.1 — 2021-01-24
- 1.0.0 — 2021-01-24

## README

[![Coverage Status](https://coveralls.io/repos/github/azzztec/secret-text/badge.svg?branch=main)](https://coveralls.io/github/azzztec/secret-text?branch=main)
[![Build Status](https://www.travis-ci.com/azzztec/secret-text.svg?branch=main)](https://www.travis-ci.com/azzztec/secret-text)

# Secret-Text

Hide any text without visible changes inside HTML DOM Node and get it back when needed.

## Download

> npm i -D secret-text

## Examples

```javascript
import secretText from "secret-text"

//insert secret string inside existing DOM element
let div = document.querySelector("div")
div.innerHTML += secretText.makeSecretText("hello world!")

//get secret string from existing DOM element
let originalStr = secretText.getSecretText(div.innerHTML) // 'hello world!'
```

- Before:
  ![before](https://user-images.githubusercontent.com/57875019/105613212-67beb980-5dd2-11eb-8a4c-6714f88da0cd.png)
- After:
  ![after](https://user-images.githubusercontent.com/57875019/105613210-668d8c80-5dd2-11eb-81e1-999244b2751b.png)

## API

| Method                 | Argument Type | Return Type | Description                                               |
| ---------------------- | ------------- | ----------- | --------------------------------------------------------- |
| makeSecretText( text ) | string        | string      | Returns secret text encrypted with non-printable symbols. |
| getSecretText( text )  | string        | string      | Returns secret text from received text.                   |

---
_Source: https://npm.io/package/secret-text · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
