zero.str
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

zero.str

Handling zero width characters in JavaScript.

利用零宽字符的不可见特性,可以在 web 页面中插入一些加密信息。

安装

npm i zero.str

使用

import { encodeZeroWidth, decodeZeroWidth } from "zero.str"

// 插入零宽字符
const encodeStr = encodeZeroWidth("正文内容", "hello,world!")

// 获取零宽字符
const zeroWidth = decodeZeroWidth(encodeStr)
// zeroWidth = hello,world

页面效果

img

Readme

Keywords

none

Package Sidebar

Install

npm i zero.str

Weekly Downloads

7

Version

1.1.4

License

ISC

Unpacked Size

7.99 kB

Total Files

5

Last publish

Collaborators

  • shisongyan