# z.js
**Repository Path**: mirrors_leecade/z.js
## Basic Information
- **Project Name**: z.js
- **Description**: turns content (in)visible*
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-09
- **Last Updated**: 2026-01-31
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
/*
CHANGELOG
0.2 (July 2013)
* dropped 'ASCII-mode' (tabs (\t) and spaces (\x20) instead of Unicode's ZW(N)Js)
* added 'Parts-mode'; 2nd char in MASK param
* header changed; old: "<!---->", new: \x00\x00\x00\x00\xff\xff\xff\xff
z.js(DAT [, PWD=false, MSK/RAW=false])
DAT -- content to hide/restore
(z.js only parses \u200c and \u200d)
PWD -- Password (RC4)
MSK -- MASK; default (TRUE): ▉
(optional 2nd char: Parts-mode (see Example 2.1))
RAW -- if TRUE, returns raw data instead of FALSE if encrypted
*/
1. //Basic example; results in zero-width (168=("8"*8)+("11"*8)+"16")
var tmp='Something'+z.js('hello world')+' inside';
console.log(tmp,tmp.length); → Something inside 168
console.log(z.js(tmp)); → hello world
2. //Masking; tags excluded
console.log(z.js('hello <em>world</em>',false,'*')) → ***** *****
2.1 //'Parts'-mode (2nd MSK-char); keeps wrapped content
var tmp=z.js('hides only *this* and *that*.',false,'**');
console.log(tmp) → hides only **** and ****.
console.log(z.js(tmp)) → hides only this and that.
console.log(z.js('Re*pla*ce aster*iks-wrapped* with DOTS',false,'.*'));
→ Re...ce aster........... with DOTS
console.log(z.js('@hello wo@rld@',false,'@@')); → false "(?)"
3. //Encrypt
console.log(z.js(z.js('hello world','yay'),'nay')); → false
console.log(z.js(z.js('hello world','yay'),'yay')) → hello world
console.log(z.js(z.js('hello world','yay'),'nay',true)) → }Ý©ÒEû@ó[î(L ¥