secret-text
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

Coverage Status Build Status

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

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
  • After: after

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.

Package Sidebar

Install

npm i secret-text

Weekly Downloads

8

Version

2.0.3

License

MIT

Unpacked Size

8.76 kB

Total Files

4

Last publish

Collaborators

  • azzztec