Socket
Socket
Sign inDemoInstall

@handy-common-utils/misc-utils

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@handy-common-utils/misc-utils - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

2

dist/mask.js

@@ -68,3 +68,3 @@ "use strict";

*/
function masker(keepLeft = 1, keepRight = 0, minLength = 3, maskLengthOrMaskString = null, maskPattern = '*') {
function masker(keepLeft, keepRight, minLength, maskLengthOrMaskString, maskPattern) {
return input => mask(input, keepLeft, keepRight, minLength, maskLengthOrMaskString, maskPattern);

@@ -71,0 +71,0 @@ }

{
"name": "@handy-common-utils/misc-utils",
"version": "1.5.1",
"version": "1.5.2",
"description": "Miscellaneous utilities",

@@ -5,0 +5,0 @@ "scripts": {

@@ -1240,9 +1240,9 @@ # @handy-common-utils/misc-utils

| Name | Type | Default value | Description |
| :------ | :------ | :------ | :------ |
| `keepLeft` | `number` | `1` | Number of characters on the left to be kept in the output without masking. Default value is 1. |
| `keepRight` | `number` | `0` | Number of characters on the right to be kept in the output without masking. Default value is 0. |
| `minLength` | `number` | `3` | Minimal length of the string for keepLeft and keepRight to be effective. If the input string is shorter than this length, the whole string would be masked. Default value is 3. |
| `maskLengthOrMaskString` | `undefined` \| ``null`` \| `string` \| `number` | `null` | The string to be used for replacing the part in the input that needs to be masked, or the length of the mask string if a fixed length is desired, or null/undefined if the mask string should have the same length as the part to be masked. Default value is null. |
| `maskPattern` | `string` | `'*'` | The pattern to be repeated as the mask. Default value is '*'. |
| Name | Type | Description |
| :------ | :------ | :------ |
| `keepLeft?` | `number` | Number of characters on the left to be kept in the output without masking. Default value is 1. |
| `keepRight?` | `number` | Number of characters on the right to be kept in the output without masking. Default value is 0. |
| `minLength?` | `number` | Minimal length of the string for keepLeft and keepRight to be effective. If the input string is shorter than this length, the whole string would be masked. Default value is 3. |
| `maskLengthOrMaskString?` | ``null`` \| `string` \| `number` | The string to be used for replacing the part in the input that needs to be masked, or the length of the mask string if a fixed length is desired, or null/undefined if the mask string should have the same length as the part to be masked. Default value is null. |
| `maskPattern?` | `string` | The pattern to be repeated as the mask. Default value is '*'. |

@@ -1249,0 +1249,0 @@ ###### Returns

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc