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.d.cts CHANGED
@@ -1,19 +1,16 @@
1
- import { L as Language, S as SeverityLevel, C as CheckProfanityResult } from './types-BgQe4FSE.cjs';
2
- export { c as ContextAwareConfig, F as Filter, a as FilterConfig, b as FilteredProfanityResult, H as HybridAnalysisResult, e as MLAnalysisResult, f as MLDetectorConfig, M as Match, F as ProfanityFilter, T as ToxicityLabel, d as ToxicityPrediction } from './types-BgQe4FSE.cjs';
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
- interface ProfanityCheckerConfig {
5
- languages?: Language[];
6
- allLanguages?: boolean;
7
- caseSensitive?: boolean;
8
- wordBoundaries?: boolean;
9
- customWords?: string[];
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, Language, 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 };
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 { L as Language, S as SeverityLevel, C as CheckProfanityResult } from './types-BgQe4FSE.js';
2
- export { c as ContextAwareConfig, F as Filter, a as FilterConfig, b as FilteredProfanityResult, H as HybridAnalysisResult, e as MLAnalysisResult, f as MLDetectorConfig, M as Match, F as ProfanityFilter, T as ToxicityLabel, d as ToxicityPrediction } from './types-BgQe4FSE.js';
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
- interface ProfanityCheckerConfig {
5
- languages?: Language[];
6
- allLanguages?: boolean;
7
- caseSensitive?: boolean;
8
- wordBoundaries?: boolean;
9
- customWords?: string[];
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, Language, 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 };
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 };