pull/402/head^2^2
Pete Matsyburka 8 months ago
parent bc1d5a9825
commit 3f872da435

@ -16,7 +16,7 @@ module TextUtils
end end
def mask_value(text, unmask_size = 0) def mask_value(text, unmask_size = 0)
if unmask_size.is_a?(Numeric) && !unmask_size.zero? if unmask_size.is_a?(Numeric) && !unmask_size.zero? && unmask_size.abs < text.length
if unmask_size.negative? if unmask_size.negative?
[ [
text.first(text.length + unmask_size).gsub(MASK_REGEXP, MASK_SYMBOL), text.first(text.length + unmask_size).gsub(MASK_REGEXP, MASK_SYMBOL),

Loading…
Cancel
Save