glin-profanity 3.1.1 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +26 -2266
- package/dist/index.d.cts +11 -14
- package/dist/index.d.ts +11 -14
- package/dist/index.js +4983 -2199
- package/dist/ml/index.cjs +4 -30
- package/dist/ml/index.d.cts +2 -2
- package/dist/ml/index.d.ts +2 -2
- package/dist/ml/index.js +4935 -8
- package/dist/{types-BgQe4FSE.d.cts → types-CdDqSZY7.d.cts} +1 -1
- package/dist/{types-BgQe4FSE.d.ts → types-CdDqSZY7.d.ts} +1 -1
- package/package.json +6 -2
- package/dist/chunk-KNHWF6MX.js +0 -5050
package/dist/index.d.cts
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { c as ContextAwareConfig,
|
|
1
|
+
import { F as FilterConfig, S as SeverityLevel, C as CheckProfanityResult } from './types-CdDqSZY7.cjs';
|
|
2
|
+
export { c as ContextAwareConfig, a as Filter, b as FilteredProfanityResult, H as HybridAnalysisResult, L as Language, e as MLAnalysisResult, f as MLDetectorConfig, M as Match, a as ProfanityFilter, T as ToxicityLabel, d as ToxicityPrediction } from './types-CdDqSZY7.cjs';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
replaceWith?: string;
|
|
11
|
-
severityLevels?: boolean;
|
|
12
|
-
ignoreWords?: string[];
|
|
13
|
-
allowObfuscatedMatch?: boolean;
|
|
14
|
-
fuzzyToleranceLevel?: number;
|
|
4
|
+
/**
|
|
5
|
+
* Configuration options for the profanity checker hook and functions.
|
|
6
|
+
* Extends FilterConfig with additional convenience options for V3 features.
|
|
7
|
+
*/
|
|
8
|
+
interface ProfanityCheckerConfig extends Omit<FilterConfig, 'logProfanity'> {
|
|
9
|
+
/** Minimum severity level to include in results */
|
|
15
10
|
minSeverity?: SeverityLevel;
|
|
11
|
+
/** Auto-replace profanity with replaceWith string */
|
|
16
12
|
autoReplace?: boolean;
|
|
13
|
+
/** Custom callback when profanity is detected */
|
|
17
14
|
customActions?: (result: CheckProfanityResult) => void;
|
|
18
15
|
}
|
|
19
16
|
interface ProfanityCheckResult extends CheckProfanityResult {
|
|
@@ -282,4 +279,4 @@ declare function detectCharacterSets(text: string): {
|
|
|
282
279
|
hasMixed: boolean;
|
|
283
280
|
};
|
|
284
281
|
|
|
285
|
-
export { CheckProfanityResult,
|
|
282
|
+
export { CheckProfanityResult, FilterConfig, type LeetspeakLevel, type LeetspeakOptions, type ProfanityCheckResult, type ProfanityCheckerConfig, SeverityLevel, type UnicodeNormalizationOptions, checkProfanity, checkProfanityAsync, collapseRepeatedCharacters, collapseSpacedCharacters, containsLeetspeak, containsUnicodeObfuscation, convertFullWidth, convertHomoglyphs, detectCharacterSets, generateLeetspeakVariants, isWordProfane, normalizeLeetspeak, normalizeNFKD, normalizeUnicode, removeZeroWidthCharacters, useProfanityChecker };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { c as ContextAwareConfig,
|
|
1
|
+
import { F as FilterConfig, S as SeverityLevel, C as CheckProfanityResult } from './types-CdDqSZY7.js';
|
|
2
|
+
export { c as ContextAwareConfig, a as Filter, b as FilteredProfanityResult, H as HybridAnalysisResult, L as Language, e as MLAnalysisResult, f as MLDetectorConfig, M as Match, a as ProfanityFilter, T as ToxicityLabel, d as ToxicityPrediction } from './types-CdDqSZY7.js';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
replaceWith?: string;
|
|
11
|
-
severityLevels?: boolean;
|
|
12
|
-
ignoreWords?: string[];
|
|
13
|
-
allowObfuscatedMatch?: boolean;
|
|
14
|
-
fuzzyToleranceLevel?: number;
|
|
4
|
+
/**
|
|
5
|
+
* Configuration options for the profanity checker hook and functions.
|
|
6
|
+
* Extends FilterConfig with additional convenience options for V3 features.
|
|
7
|
+
*/
|
|
8
|
+
interface ProfanityCheckerConfig extends Omit<FilterConfig, 'logProfanity'> {
|
|
9
|
+
/** Minimum severity level to include in results */
|
|
15
10
|
minSeverity?: SeverityLevel;
|
|
11
|
+
/** Auto-replace profanity with replaceWith string */
|
|
16
12
|
autoReplace?: boolean;
|
|
13
|
+
/** Custom callback when profanity is detected */
|
|
17
14
|
customActions?: (result: CheckProfanityResult) => void;
|
|
18
15
|
}
|
|
19
16
|
interface ProfanityCheckResult extends CheckProfanityResult {
|
|
@@ -282,4 +279,4 @@ declare function detectCharacterSets(text: string): {
|
|
|
282
279
|
hasMixed: boolean;
|
|
283
280
|
};
|
|
284
281
|
|
|
285
|
-
export { CheckProfanityResult,
|
|
282
|
+
export { CheckProfanityResult, FilterConfig, type LeetspeakLevel, type LeetspeakOptions, type ProfanityCheckResult, type ProfanityCheckerConfig, SeverityLevel, type UnicodeNormalizationOptions, checkProfanity, checkProfanityAsync, collapseRepeatedCharacters, collapseSpacedCharacters, containsLeetspeak, containsUnicodeObfuscation, convertFullWidth, convertHomoglyphs, detectCharacterSets, generateLeetspeakVariants, isWordProfane, normalizeLeetspeak, normalizeNFKD, normalizeUnicode, removeZeroWidthCharacters, useProfanityChecker };
|