Skip to content

masking

Category
Processing
Environment
Node & Browser
Last updated
2024/04/22 08:13:11

String masking.

Demo

source
Origin string:
Mask range:
from
to
Mask code:
Masked:
@b************ls

Usage

ts
import { masking } from "@bernankez/utils";

const pkg = "@bernankez/utils";

const masked = masking(pkg, [3, -3]); // "@be**********ils"

const masked1 = masking(pkg, [[2, 4], [6, 8]]); // @b**na**ez/utils

const masked2 = masking(pkg, [3, -3], "-"); // @be----------ils

Source

SourceDemoDocsTests