Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

string-master

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-master - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

1

lib/index.d.ts
export { CasingMaster } from './case-master';
export { CompressionMaster } from './compression-master';
export { ConversionMaster } from './conversion-master';

@@ -4,0 +3,0 @@ export { EmojiMaster } from './emoji-master';

4

lib/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValidationMaster = exports.TemplateMaster = exports.SlugMaster = exports.SimilarityMaster = exports.SearchMaster = exports.SanitizationMaster = exports.ObfuscationMaster = exports.MaskingMaster = exports.ManipulationMaster = exports.InitialsMaster = exports.InflectionMaster = exports.FrequencyMaster = exports.EntropyMaster = exports.EmojiMaster = exports.ConversionMaster = exports.CompressionMaster = exports.CasingMaster = void 0;
exports.ValidationMaster = exports.TemplateMaster = exports.SlugMaster = exports.SimilarityMaster = exports.SearchMaster = exports.SanitizationMaster = exports.ObfuscationMaster = exports.MaskingMaster = exports.ManipulationMaster = exports.InitialsMaster = exports.InflectionMaster = exports.FrequencyMaster = exports.EntropyMaster = exports.EmojiMaster = exports.ConversionMaster = exports.CasingMaster = void 0;
var case_master_1 = require("./case-master");
Object.defineProperty(exports, "CasingMaster", { enumerable: true, get: function () { return case_master_1.CasingMaster; } });
var compression_master_1 = require("./compression-master");
Object.defineProperty(exports, "CompressionMaster", { enumerable: true, get: function () { return compression_master_1.CompressionMaster; } });
var conversion_master_1 = require("./conversion-master");

@@ -9,0 +7,0 @@ Object.defineProperty(exports, "ConversionMaster", { enumerable: true, get: function () { return conversion_master_1.ConversionMaster; } });

@@ -42,26 +42,2 @@ "use strict";

*/
// static maskSSN(input: string): string {
// const length = input.length;
// const visibleLength = 4;
// if (length <= visibleLength) {
// // If the length is less than or equal to the visible length, no masking is needed.
// return input;
// }
// // Mask all characters except the last `visibleLength` characters.
// const maskedPart = '*'.repeat(length - visibleLength);
// // Determine the number of characters in the masked part that should be preserved
// let result = '';
// for (let i = 0; i < length; i++) {
// if (i < maskedPart.length) {
// if (input[i] === '-' || input[i] === ' ') {
// result += input[i]; // Preserve delimiters
// } else {
// result += '*'; // Mask other characters
// }
// } else {
// result += input[i]; // Add visible part
// }
// }
// return result;
// }
static maskSSN(input) {

@@ -68,0 +44,0 @@ const length = input.length;

{
"name": "string-master",
"version": "1.0.1",
"version": "1.0.2",
"description": "A powerful TypeScript library designed to simplify a wide range of string operations and manipulations.",

@@ -74,5 +74,4 @@ "main": "./lib/index.js",

"typescript": "^5.5.4",
"typescript-eslint": "^8.4.0",
"lz-string": "^1.5.0"
"typescript-eslint": "^8.4.0"
}
}

@@ -18,3 +18,2 @@ # String Master

- [ConversionMaster](#2-ConversionMaster): Convert strings between different types, such as hexadecimal, integers, or float.
- [CompressionMaster](#3-compressionmaster): Compress and decompress strings.
- [EmojiMaster](#4-emojimaster): Manipulate, find, or replace emojis in strings.

@@ -92,15 +91,3 @@ - [EntropyMaster](#5-entropymaster): Calculate the entropy of a string for cryptographic analysis.

### 3. CompressionMaster
The CompressionMaster class handles string compression and decompression.
```ts
import { CompressionMaster } from 'string-master';
const compressed = CompressionMaster.compress('Hello, world!');
console.log(compressed); // Compressed string (e.g., "〶惶̀Ў㦀☄∀")
const decompressed = CompressionMaster.decompress(compressed);
console.log(decompressed); // 'Hello, world!'
```
### 4. EmojiMaster
### 3. EmojiMaster
The EmojiMaster class helps find, replace, or manipulate emojis in strings.

@@ -120,3 +107,3 @@ ```ts

### 5. EntropyMaster
### 4. EntropyMaster
The EntropyMaster class calculates the entropy of a string, useful for cryptography or information theory.

@@ -130,3 +117,3 @@ ```ts

### 6. FrequencyMaster
### 5. FrequencyMaster
The FrequencyMaster class analyzes the frequency of characters or words in a string.

@@ -144,3 +131,3 @@ ```ts

```
### 7. InflectionMaster
### 6. InflectionMaster
The InflectionMaster class handles pluralization and singularization of words.

@@ -198,3 +185,3 @@

### 8. InitialsMaster
### 7. InitialsMaster
The InitialsMaster class extracts initials from a string.

@@ -274,3 +261,3 @@

### 9. ManipulationMaster
### 8. ManipulationMaster
The ManipulationMaster class provides methods to perform various manipulations on strings, like reversing or shuffling.

@@ -346,3 +333,3 @@

### 10. MaskingMaster
### 9. MaskingMaster
The MaskingMaster class masks parts of a string, such as credit card numbers or emails.

@@ -370,3 +357,3 @@

```
### 11. ObfuscationMaster
### 10. ObfuscationMaster
The ObfuscationMaster class obfuscates and deobfuscates strings for privacy or security purposes.

@@ -395,3 +382,3 @@

```
### 12. SanitizationMaster
### 11. SanitizationMaster
The SanitizationMaster class provides methods to sanitize strings, removing unwanted characters or formatting.

@@ -417,3 +404,3 @@

### 13. SearchMaster
### 12. SearchMaster
The SearchMaster class provides methods for searching within strings, including fuzzy search and proximity search.

@@ -459,3 +446,3 @@

```
### 14. SimilarityMaster
### 13. SimilarityMaster
The SimilarityMaster class calculates the similarity between two strings using various algorithms like Jaccard, Levenshtein, and Jaro-Winkler.

@@ -505,3 +492,3 @@

### 15. SlugMaster
### 14. SlugMaster
The SlugMaster class converts strings to URL-friendly slugs.

@@ -531,3 +518,3 @@

### 16. TemplateMaster
### 15. TemplateMaster
The TemplateMaster class allows for simple templating and string interpolation.

@@ -558,3 +545,3 @@

### 17. TrimmingMaster
### 16. TrimmingMaster
The TrimmingMaster class provides various methods for trimming whitespace or characters from strings.

@@ -580,3 +567,3 @@

### 18. ValidationMaster
### 17. ValidationMaster
The ValidationMaster class validates strings against different rules, such as email or URL formats.

@@ -583,0 +570,0 @@

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