UNPKG

@daysnap/utils

Version:
14 lines (12 loc) 262 B
// src/filterString.ts function filterString(val, sep = "*", start = 0, end) { return val.split("").map((s, index) => { if (index >= start && index < (end ?? val.length)) { return sep; } return s; }).join(""); } export { filterString };