zero-contact 0.1.0
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/README.md +108 -0
- package/dist/index.cjs +572 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +566 -0
- package/dist/index.js.map +1 -0
- package/dist/locales/en.cjs +48 -0
- package/dist/locales/en.cjs.map +1 -0
- package/dist/locales/en.d.cts +5 -0
- package/dist/locales/en.d.ts +5 -0
- package/dist/locales/en.js +46 -0
- package/dist/locales/en.js.map +1 -0
- package/dist/locales/index.cjs +79 -0
- package/dist/locales/index.cjs.map +1 -0
- package/dist/locales/index.d.cts +3 -0
- package/dist/locales/index.d.ts +3 -0
- package/dist/locales/index.js +76 -0
- package/dist/locales/index.js.map +1 -0
- package/dist/locales/tr.cjs +55 -0
- package/dist/locales/tr.cjs.map +1 -0
- package/dist/locales/tr.d.cts +5 -0
- package/dist/locales/tr.d.ts +5 -0
- package/dist/locales/tr.js +53 -0
- package/dist/locales/tr.js.map +1 -0
- package/dist/types-C4A9Bbv7.d.cts +30 -0
- package/dist/types-C4A9Bbv7.d.ts +30 -0
- package/package.json +97 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/match/false-positives.ts","../src/match/scorer.ts","../src/locales/types.ts","../src/normalize/emoji.ts","../src/normalize/homoglyph.ts","../src/normalize/unicode.ts","../src/normalize/word-digits.ts","../src/match/sequence.ts","../src/locales/build-locale.ts","../src/locales/en.ts","../src/locales/tr.ts","../src/pipeline/options.ts","../src/pipeline/quick-check.ts","../src/pipeline/detect.ts","../src/pipeline/mask.ts"],"names":["homoglyph"],"mappings":";;;AAEA,IAAM,aAAA,GAAgB;AAAA,EACpB,qCAAA;AAAA,EACA;AACF,CAAA;AAEA,IAAM,aAAA,GAAgB;AAAA,EACpB,8BAAA;AAAA,EACA;AACF,CAAA;AAEA,IAAM,YAAA,GA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AK,MAAM,CAAC,CAAA,IAAK,EAAE,CAAA,EAAG;AAC9B,QAAA,KAAA,CAAM,CAAC,CAAA,GAAI,IAAA;AAAA,MACb;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,KAAA,CAAM,KAAK,EAAE,CAAA;AACtB","file":"index.cjs","sourcesContent":["import type { DigitSequence } from './sequence.js';\n\nconst DATE_PATTERNS = [\n /\\b\\d{1,2}[/.-]\\d{1,2}[/.-]\\d{2,4}\\b/,\n /\\b\\d{4}[/.-]\\d{1,2}[/.-]\\d{1,2}\\b/,\n];\n\nconst TIME_PATTERNS = [\n /\\b\\d{1,2}:\\d{2}(?::\\d{2})?\\b/,\n /\\b\\d{1,2}\\.\\d{2}\\b/,\n];\n\nconst IPV4_PATTERN = /\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b/;\n\nexport function isFalsePositive(sequence: DigitSequence, sourceText: string): boolean {\n const snippet = sourceText.slice(sequence.start, sequence.end);\n\n for (const pattern of DATE_PATTERNS) {\n if (pattern.test(snippet)) {\n return true;\n }\n }\n\n for (const pattern of TIME_PATTERNS) {\n if (pattern.test(snippet)) {\n return true;\n }\n }\n\n if (IPV4_PATTERN.test(snippet)) {\n return true;\n }\n\n if (/^(\\d)\\1{11,}$/.test(sequence.normalized)) {\n return true;\n }\n\n return false;\n}\n","import type { DetectOptions, ObfuscationType } from '../locales/types.js';\nimport type { DigitSequence } from './sequence.js';\n\nfunction isTrMobile(normalized: string): boolean {\n const digits = normalized.replace(/\\D/g, '');\n\n if (digits.length === 10 && /^5\\d{9}$/.test(digits)) {\n return true;\n }\n\n if (digits.length === 11 && /^05\\d{9}$/.test(digits)) {\n return true;\n }\n\n if (digits.length === 12 && /^905\\d{9}$/.test(digits)) {\n return true;\n }\n\n if (digits.length === 13 && /^\\+?905\\d{9}$/.test(digits)) {\n return true;\n }\n\n return false;\n}\n\nfunction hasPrefix(sourceText: string, sequence: DigitSequence): boolean {\n const before = sourceText.slice(Math.max(0, sequence.start - 4), sequence.start);\n return /\\+/.test(before) || /^0/.test(sequence.normalized);\n}\n\nfunction countObfuscationTypes(types: ObfuscationType[]): number {\n if (types.includes('mixed')) {\n return 3;\n }\n return types.length;\n}\n\nexport function scoreSequence(\n sequence: DigitSequence,\n sourceText: string,\n options: DetectOptions,\n): number {\n let score = 0.35;\n\n const digits = sequence.normalized;\n const digitCount = digits.length;\n const countryHint = options.countryHint ?? 'TR';\n\n if (countryHint === 'TR' && isTrMobile(digits)) {\n score += 0.4;\n } else if (digitCount >= 10 && digitCount <= 15) {\n score += 0.25;\n } else if (digitCount >= 7) {\n score += 0.15;\n }\n\n if (hasPrefix(sourceText, sequence)) {\n score += 0.15;\n }\n\n const typeCount = countObfuscationTypes(sequence.types);\n if (typeCount >= 2 || sequence.types.includes('mixed')) {\n score += 0.2;\n } else if (sequence.types[0] !== 'numeric') {\n score += 0.15;\n }\n\n if (sequence.types.length === 1 && sequence.types[0] === 'numeric' && digitCount === 10) {\n score += 0.1;\n }\n\n if (digitCount < 8) {\n score -= 0.15;\n }\n\n return Math.max(0, Math.min(1, score));\n}\n","export type ObfuscationType = 'numeric' | 'word' | 'emoji' | 'homoglyph' | 'mixed';\n\nexport interface Locale {\n readonly id: string;\n readonly digitWords: ReadonlyMap<string, string>;\n readonly multipliers: ReadonlyMap<string, number>;\n readonly preScanPattern: RegExp;\n}\n\nexport interface PhoneMatch {\n start: number;\n end: number;\n text: string;\n normalized: string;\n confidence: number;\n types: ObfuscationType[];\n}\n\nexport interface DetectOptions {\n locales?: Locale[];\n minDigits?: number;\n minConfidence?: number;\n countryHint?: 'TR' | 'INTL';\n}\n\nexport interface MaskOptions extends DetectOptions {\n char?: string;\n}\n\nexport interface DetectResult {\n detected: boolean;\n matches: PhoneMatch[];\n}\n\nexport interface DigitToken {\n digit: string;\n start: number;\n end: number;\n type: ObfuscationType;\n}\n\nexport const SEPARATORS = new Set([' ', '\\t', '-', '.', ',', '/', '(', ')', '+', '\\u00a0']);\n\nexport const DEFAULT_MIN_DIGITS = 7;\nexport const DEFAULT_MIN_CONFIDENCE = 0.6;\n","const CIRCLED_DIGITS: Record<number, string> = {\n 0x24ea: '0',\n 0x2460: '1',\n 0x2461: '2',\n 0x2462: '3',\n 0x2463: '4',\n 0x2464: '5',\n 0x2465: '6',\n 0x2466: '7',\n 0x2467: '8',\n 0x2468: '9',\n 0x2776: '1',\n 0x2777: '2',\n 0x2778: '3',\n 0x2779: '4',\n 0x277a: '5',\n 0x277b: '6',\n 0x277c: '7',\n 0x277d: '8',\n 0x277e: '9',\n};\n\nexport function isKeycapStart(text: string, index: number): number | null {\n const char = text[index];\n if (!char || !/[0-9#*]/.test(char)) return null;\n\n let consumed = 1;\n if (text[index + 1] === '\\uFE0F') {\n consumed += 1;\n }\n\n if (text[index + consumed] === '\\u20E3') {\n consumed += 1;\n if (char === '#' || char === '*') return null;\n return consumed;\n }\n\n return null;\n}\n\nexport function circledDigitToAscii(text: string, index: number): { digit: string; length: number } | null {\n const code = text.codePointAt(index);\n if (code === undefined) return null;\n\n const digit = CIRCLED_DIGITS[code];\n if (!digit) return null;\n\n const length = code > 0xffff ? 2 : 1;\n return { digit, length };\n}\n\nexport const EMOJI_PRESCAN = /(?:[0-9#*]\\uFE0F?\\u20E3|[\\u2460-\\u2468\\u24EA\\u2776-\\u277E])/u;\n","const HOMOGLYPH_MAP: Record<string, string> = {\n O: '0',\n o: '0',\n l: '1',\n I: '1',\n i: '1',\n '|': '1',\n '!': '1',\n S: '5',\n s: '5',\n B: '8',\n Z: '2',\n z: '2',\n g: '9',\n q: '9',\n};\n\nexport function homoglyphToDigit(char: string): string | null {\n return HOMOGLYPH_MAP[char] ?? null;\n}\n\nexport function isDigitLikeContext(text: string, index: number): boolean {\n const prev = text[index - 1];\n const next = text[index + 1];\n\n const prevIsDigitLike =\n prev !== undefined &&\n (/[0-9]/.test(prev) ||\n homoglyphToDigit(prev) !== null ||\n /[\\s\\-.,/()+]/.test(prev));\n\n const nextIsDigitLike =\n next !== undefined &&\n (/[0-9]/.test(next) ||\n homoglyphToDigit(next) !== null ||\n /[\\s\\-.,/()+]/.test(next));\n\n return prevIsDigitLike || nextIsDigitLike;\n}\n","const INVISIBLE_CHARS = /[\\u200B-\\u200D\\uFEFF\\u2060\\u180E]/g;\n\nexport function nfkc(text: string): string {\n return text.normalize('NFKC');\n}\n\nexport function stripInvisible(text: string): string {\n return text.replace(INVISIBLE_CHARS, '');\n}\n\nexport function unicodeDigitToAscii(char: string): string | null {\n const code = char.codePointAt(0);\n if (code === undefined) return null;\n\n if (code >= 0x30 && code <= 0x39) {\n return char;\n }\n\n if (code >= 0xff10 && code <= 0xff19) {\n return String.fromCharCode(code - 0xff10 + 0x30);\n }\n\n if (code >= 0x0660 && code <= 0x0669) {\n return String.fromCharCode(code - 0x0660 + 0x30);\n }\n\n if (code >= 0x06f0 && code <= 0x06f9) {\n return String.fromCharCode(code - 0x06f0 + 0x30);\n }\n\n if (code >= 0x0966 && code <= 0x096f) {\n return String.fromCharCode(code - 0x0966 + 0x30);\n }\n\n const superscriptMap: Record<number, string> = {\n 0x2070: '0',\n 0x00b9: '1',\n 0x00b2: '2',\n 0x00b3: '3',\n 0x2074: '4',\n 0x2075: '5',\n 0x2076: '6',\n 0x2077: '7',\n 0x2078: '8',\n 0x2079: '9',\n };\n\n const superscript = superscriptMap[code];\n if (superscript) {\n return superscript;\n }\n\n return null;\n}\n\nexport function normalizeUnicodeDigits(text: string): string {\n let result = '';\n for (const char of text) {\n const digit = unicodeDigitToAscii(char);\n result += digit ?? char;\n }\n return result;\n}\n\nexport function foldTurkish(text: string): string {\n return text\n .replace(/ı/g, 'i')\n .replace(/İ/g, 'i')\n .replace(/ş/g, 's')\n .replace(/Ş/g, 's')\n .replace(/ğ/g, 'g')\n .replace(/Ğ/g, 'g')\n .replace(/ü/g, 'u')\n .replace(/Ü/g, 'u')\n .replace(/ö/g, 'o')\n .replace(/Ö/g, 'o')\n .replace(/ç/g, 'c')\n .replace(/Ç/g, 'c');\n}\n\nexport function normalizeForLookup(text: string): string {\n return foldTurkish(nfkc(stripInvisible(text)).toLowerCase());\n}\n","import type { Locale } from '../locales/types.js';\nimport type { DigitToken, ObfuscationType } from '../locales/types.js';\nimport { circledDigitToAscii, isKeycapStart } from './emoji.js';\nimport { homoglyphToDigit, isDigitLikeContext } from './homoglyph.js';\nimport { normalizeForLookup, unicodeDigitToAscii } from './unicode.js';\n\ninterface LocaleLookup {\n digitWords: Map<string, string>;\n multipliers: Map<string, number>;\n wordPattern: RegExp;\n}\n\nfunction buildLookup(locales: Locale[]): LocaleLookup {\n const digitWords = new Map<string, string>();\n const multipliers = new Map<string, number>();\n\n for (const locale of locales) {\n for (const [word, digit] of locale.digitWords) {\n digitWords.set(normalizeForLookup(word), digit);\n }\n for (const [word, count] of locale.multipliers) {\n multipliers.set(normalizeForLookup(word), count);\n }\n }\n\n const words = [...new Set([...digitWords.keys(), ...multipliers.keys()])]\n .sort((a, b) => b.length - a.length)\n .map((word) => word.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'));\n\n const wordPattern = new RegExp(`\\\\b(?:${words.join('|')})\\\\b`, 'giu');\n\n return { digitWords, multipliers, wordPattern };\n}\n\nfunction isSeparator(char: string): boolean {\n return /[\\s\\-.,/()+]/.test(char) || char === '\\u00a0';\n}\n\nfunction isWordChar(char: string): boolean {\n return /[\\p{L}_]/u.test(char);\n}\n\nfunction pushDigit(\n tokens: DigitToken[],\n digit: string,\n start: number,\n end: number,\n type: ObfuscationType,\n repeat = 1,\n): void {\n for (let i = 0; i < repeat; i += 1) {\n tokens.push({ digit, start, end, type });\n }\n}\n\nexport function tokenizeDigits(text: string, locales: Locale[]): DigitToken[] {\n const lookup = buildLookup(locales);\n const tokens: DigitToken[] = [];\n let pendingRepeat = 1;\n let index = 0;\n\n while (index < text.length) {\n const keycapLength = isKeycapStart(text, index);\n if (keycapLength !== null) {\n const digit = text[index]!;\n pushDigit(tokens, digit, index, index + keycapLength, 'emoji', pendingRepeat);\n pendingRepeat = 1;\n index += keycapLength;\n continue;\n }\n\n const circled = circledDigitToAscii(text, index);\n if (circled) {\n pushDigit(tokens, circled.digit, index, index + circled.length, 'emoji', pendingRepeat);\n pendingRepeat = 1;\n index += circled.length;\n continue;\n }\n\n const char = text[index]!;\n\n if (isWordChar(char)) {\n let end = index + 1;\n while (end < text.length && isWordChar(text[end]!)) {\n end += 1;\n }\n\n if (end === index + 1) {\n const homoglyph = homoglyphToDigit(char);\n if (homoglyph && isDigitLikeContext(text, index)) {\n pushDigit(tokens, homoglyph, index, index + 1, 'homoglyph', pendingRepeat);\n pendingRepeat = 1;\n index += 1;\n continue;\n }\n }\n\n const rawWord = text.slice(index, end);\n const normalizedWord = normalizeForLookup(rawWord);\n\n const multiplier = lookup.multipliers.get(normalizedWord);\n if (multiplier !== undefined) {\n pendingRepeat = multiplier;\n index = end;\n continue;\n }\n\n const digit = lookup.digitWords.get(normalizedWord);\n if (digit !== undefined) {\n pushDigit(tokens, digit, index, end, 'word', pendingRepeat);\n pendingRepeat = 1;\n index = end;\n continue;\n }\n\n index = end;\n continue;\n }\n\n const asciiDigit = unicodeDigitToAscii(char);\n if (asciiDigit) {\n pushDigit(tokens, asciiDigit, index, index + 1, 'numeric', pendingRepeat);\n pendingRepeat = 1;\n index += 1;\n continue;\n }\n\n const homoglyph = homoglyphToDigit(char);\n if (homoglyph && isDigitLikeContext(text, index)) {\n pushDigit(tokens, homoglyph, index, index + 1, 'homoglyph', pendingRepeat);\n pendingRepeat = 1;\n index += 1;\n continue;\n }\n\n if (isSeparator(char)) {\n index += 1;\n continue;\n }\n\n pendingRepeat = 1;\n index += 1;\n }\n\n return tokens;\n}\n\nexport function hasLocaleWordSignal(text: string, locales: Locale[]): boolean {\n const lookup = buildLookup(locales);\n const pattern = lookup.wordPattern;\n pattern.lastIndex = 0;\n return pattern.test(text);\n}\n\nexport function isMultiplierSpan(text: string, from: number, to: number, locales: Locale[]): boolean {\n const slice = text.slice(from, to).trim();\n if (!slice) {\n return true;\n }\n\n const lookup = buildLookup(locales);\n const words = slice.split(/\\s+/);\n return words.every((word) => lookup.multipliers.has(normalizeForLookup(word)));\n}\n","import type { DigitToken, ObfuscationType, Locale } from '../locales/types.js';\nimport { SEPARATORS } from '../locales/types.js';\nimport { isMultiplierSpan } from '../normalize/word-digits.js';\n\nexport interface DigitSequence {\n tokens: DigitToken[];\n start: number;\n end: number;\n normalized: string;\n types: ObfuscationType[];\n}\n\nfunction onlySeparatorsBetween(\n text: string,\n from: number,\n to: number,\n locales: Locale[],\n): boolean {\n if (from >= to) {\n return true;\n }\n\n if (isMultiplierSpan(text, from, to, locales)) {\n return true;\n }\n\n for (let i = from; i < to; i += 1) {\n const char = text[i]!;\n if (!SEPARATORS.has(char)) {\n return false;\n }\n }\n return true;\n}\n\nfunction collectTypes(tokens: DigitToken[]): ObfuscationType[] {\n const unique = new Set(tokens.map((token) => token.type));\n if (unique.size > 1) {\n return ['mixed'];\n }\n return [...unique];\n}\n\nexport function findDigitSequences(\n text: string,\n tokens: DigitToken[],\n minDigits: number,\n locales: Locale[] = [],\n): DigitSequence[] {\n if (tokens.length === 0) {\n return [];\n }\n\n const sequences: DigitSequence[] = [];\n let group: DigitToken[] = [tokens[0]!];\n\n for (let i = 1; i < tokens.length; i += 1) {\n const prev = tokens[i - 1]!;\n const current = tokens[i]!;\n\n if (onlySeparatorsBetween(text, prev.end, current.start, locales)) {\n group.push(current);\n continue;\n }\n\n if (group.length >= minDigits) {\n sequences.push(toSequence(group));\n }\n group = [current];\n }\n\n if (group.length >= minDigits) {\n sequences.push(toSequence(group));\n }\n\n return sequences;\n}\n\nfunction toSequence(tokens: DigitToken[]): DigitSequence {\n const first = tokens[0]!;\n const last = tokens[tokens.length - 1]!;\n\n return {\n tokens,\n start: first.start,\n end: last.end,\n normalized: tokens.map((token) => token.digit).join(''),\n types: collectTypes(tokens),\n };\n}\n","import type { Locale } from './types.js';\n\nexport function createLocale(\n id: string,\n digitWords: Record<string, string>,\n multipliers: Record<string, number> = {},\n): Locale {\n const digitMap = new Map(Object.entries(digitWords));\n const multiplierMap = new Map(Object.entries(multipliers));\n\n const words = [...digitMap.keys(), ...multiplierMap.keys()]\n .sort((a, b) => b.length - a.length)\n .map(escapeRegex);\n\n const preScanPattern = new RegExp(\n `(?:${words.join('|')})`,\n 'iu',\n );\n\n return {\n id,\n digitWords: digitMap,\n multipliers: multiplierMap,\n preScanPattern,\n };\n}\n\nfunction escapeRegex(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { createLocale } from './build-locale.js';\n\nexport const en = createLocale(\n 'en',\n {\n zero: '0',\n oh: '0',\n one: '1',\n two: '2',\n three: '3',\n four: '4',\n five: '5',\n six: '6',\n seven: '7',\n eight: '8',\n nine: '9',\n },\n {\n double: 2,\n triple: 3,\n quad: 4,\n },\n);\n","import { createLocale } from './build-locale.js';\n\nexport const tr = createLocale(\n 'tr',\n {\n sifir: '0',\n sıfır: '0',\n bir: '1',\n iki: '2',\n uc: '3',\n üç: '3',\n dort: '4',\n dört: '4',\n bes: '5',\n beş: '5',\n alti: '6',\n altı: '6',\n yedi: '7',\n sekiz: '8',\n dokuz: '9',\n },\n {\n cift: 2,\n çift: 2,\n uclu: 3,\n üçlü: 3,\n dortlu: 4,\n dörtlü: 4,\n },\n);\n","import type { DetectOptions } from '../locales/types.js';\nimport { DEFAULT_MIN_CONFIDENCE, DEFAULT_MIN_DIGITS } from '../locales/types.js';\nimport { en } from '../locales/en.js';\nimport { tr } from '../locales/tr.js';\nimport type { Locale } from '../locales/types.js';\n\nexport interface ResolvedOptions {\n locales: Locale[];\n minDigits: number;\n minConfidence: number;\n countryHint: 'TR' | 'INTL';\n}\n\nexport function resolveOptions(options?: DetectOptions): ResolvedOptions {\n return {\n locales: options?.locales ?? [tr, en],\n minDigits: options?.minDigits ?? DEFAULT_MIN_DIGITS,\n minConfidence: options?.minConfidence ?? DEFAULT_MIN_CONFIDENCE,\n countryHint: options?.countryHint ?? 'TR',\n };\n}\n","import type { DetectOptions } from '../locales/types.js';\nimport { EMOJI_PRESCAN } from '../normalize/emoji.js';\nimport { hasLocaleWordSignal } from '../normalize/word-digits.js';\nimport { resolveOptions } from './options.js';\n\nexport function quickCheck(text: string, options?: DetectOptions): boolean {\n if (!text || text.length === 0) {\n return false;\n }\n\n const resolved = resolveOptions(options);\n\n if (/\\d/.test(text)) {\n return true;\n }\n\n if (/\\p{Nd}/u.test(text)) {\n return true;\n }\n\n if (EMOJI_PRESCAN.test(text)) {\n return true;\n }\n\n if (hasLocaleWordSignal(text, resolved.locales)) {\n return true;\n }\n\n for (const locale of resolved.locales) {\n locale.preScanPattern.lastIndex = 0;\n if (locale.preScanPattern.test(text)) {\n return true;\n }\n }\n\n if (/[+]\\s*[\\d\\p{Nd}\\s\\-().]{4,}/u.test(text)) {\n return true;\n }\n\n if (/(?:[\\d\\p{Nd}][\\s.\\-/)]{0,3}){3,}[\\d\\p{Nd}]/u.test(text)) {\n return true;\n }\n\n return false;\n}\n","import type { DetectOptions, DetectResult, PhoneMatch } from '../locales/types.js';\nimport { isFalsePositive } from '../match/false-positives.js';\nimport { scoreSequence } from '../match/scorer.js';\nimport { findDigitSequences } from '../match/sequence.js';\nimport { tokenizeDigits } from '../normalize/word-digits.js';\nimport { resolveOptions } from './options.js';\nimport { quickCheck } from './quick-check.js';\n\nexport function detect(text: string, options?: DetectOptions): DetectResult {\n if (!quickCheck(text, options)) {\n return { detected: false, matches: [] };\n }\n\n const resolved = resolveOptions(options);\n const tokens = tokenizeDigits(text, resolved.locales);\n const sequences = findDigitSequences(text, tokens, resolved.minDigits, resolved.locales);\n\n const matches: PhoneMatch[] = [];\n\n for (const sequence of sequences) {\n if (isFalsePositive(sequence, text)) {\n continue;\n }\n\n const confidence = scoreSequence(sequence, text, resolved);\n\n if (confidence < resolved.minConfidence) {\n continue;\n }\n\n matches.push({\n start: sequence.start,\n end: sequence.end,\n text: text.slice(sequence.start, sequence.end),\n normalized: sequence.normalized,\n confidence,\n types: sequence.types,\n });\n }\n\n return {\n detected: matches.length > 0,\n matches,\n };\n}\n","import type { MaskOptions } from '../locales/types.js';\nimport { detect } from './detect.js';\n\nexport function mask(text: string, options?: MaskOptions): string {\n const result = detect(text, options);\n if (!result.detected) {\n return text;\n }\n\n const char = options?.char ?? '#';\n const chars = [...text];\n const sorted = [...result.matches].sort((a, b) => b.start - a.start);\n\n for (const match of sorted) {\n for (let i = match.start; i < match.end; i += 1) {\n if (!/\\s/.test(chars[i] ?? '')) {\n chars[i] = char;\n }\n }\n }\n\n return chars.join('');\n}\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { D as DetectOptions, a as DetectResult, M as MaskOptions } from './types-C4A9Bbv7.cjs';
|
|
2
|
+
export { L as Locale, O as ObfuscationType, P as PhoneMatch } from './types-C4A9Bbv7.cjs';
|
|
3
|
+
export { en } from './locales/en.cjs';
|
|
4
|
+
export { tr } from './locales/tr.cjs';
|
|
5
|
+
|
|
6
|
+
declare function detect(text: string, options?: DetectOptions): DetectResult;
|
|
7
|
+
|
|
8
|
+
declare function quickCheck(text: string, options?: DetectOptions): boolean;
|
|
9
|
+
|
|
10
|
+
declare function mask(text: string, options?: MaskOptions): string;
|
|
11
|
+
|
|
12
|
+
export { DetectOptions, DetectResult, MaskOptions, detect, mask, quickCheck };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { D as DetectOptions, a as DetectResult, M as MaskOptions } from './types-C4A9Bbv7.js';
|
|
2
|
+
export { L as Locale, O as ObfuscationType, P as PhoneMatch } from './types-C4A9Bbv7.js';
|
|
3
|
+
export { en } from './locales/en.js';
|
|
4
|
+
export { tr } from './locales/tr.js';
|
|
5
|
+
|
|
6
|
+
declare function detect(text: string, options?: DetectOptions): DetectResult;
|
|
7
|
+
|
|
8
|
+
declare function quickCheck(text: string, options?: DetectOptions): boolean;
|
|
9
|
+
|
|
10
|
+
declare function mask(text: string, options?: MaskOptions): string;
|
|
11
|
+
|
|
12
|
+
export { DetectOptions, DetectResult, MaskOptions, detect, mask, quickCheck };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
// src/match/false-positives.ts
|
|
2
|
+
var DATE_PATTERNS = [
|
|
3
|
+
/\b\d{1,2}[/.-]\d{1,2}[/.-]\d{2,4}\b/,
|
|
4
|
+
/\b\d{4}[/.-]\d{1,2}[/.-]\d{1,2}\b/
|
|
5
|
+
];
|
|
6
|
+
var TIME_PATTERNS = [
|
|
7
|
+
/\b\d{1,2}:\d{2}(?::\d{2})?\b/,
|
|
8
|
+
/\b\d{1,2}\.\d{2}\b/
|
|
9
|
+
];
|
|
10
|
+
var IPV4_PATTERN = /\b(?:\d{1,3}\.){3}\d{1,3}\b/;
|
|
11
|
+
function isFalsePositive(sequence, sourceText) {
|
|
12
|
+
const snippet = sourceText.slice(sequence.start, sequence.end);
|
|
13
|
+
for (const pattern of DATE_PATTERNS) {
|
|
14
|
+
if (pattern.test(snippet)) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
for (const pattern of TIME_PATTERNS) {
|
|
19
|
+
if (pattern.test(snippet)) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (IPV4_PATTERN.test(snippet)) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
if (/^(\d)\1{11,}$/.test(sequence.normalized)) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// src/match/scorer.ts
|
|
33
|
+
function isTrMobile(normalized) {
|
|
34
|
+
const digits = normalized.replace(/\D/g, "");
|
|
35
|
+
if (digits.length === 10 && /^5\d{9}$/.test(digits)) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
if (digits.length === 11 && /^05\d{9}$/.test(digits)) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
if (digits.length === 12 && /^905\d{9}$/.test(digits)) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
if (digits.length === 13 && /^\+?905\d{9}$/.test(digits)) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
function hasPrefix(sourceText, sequence) {
|
|
50
|
+
const before = sourceText.slice(Math.max(0, sequence.start - 4), sequence.start);
|
|
51
|
+
return /\+/.test(before) || /^0/.test(sequence.normalized);
|
|
52
|
+
}
|
|
53
|
+
function countObfuscationTypes(types) {
|
|
54
|
+
if (types.includes("mixed")) {
|
|
55
|
+
return 3;
|
|
56
|
+
}
|
|
57
|
+
return types.length;
|
|
58
|
+
}
|
|
59
|
+
function scoreSequence(sequence, sourceText, options) {
|
|
60
|
+
let score = 0.35;
|
|
61
|
+
const digits = sequence.normalized;
|
|
62
|
+
const digitCount = digits.length;
|
|
63
|
+
const countryHint = options.countryHint ?? "TR";
|
|
64
|
+
if (countryHint === "TR" && isTrMobile(digits)) {
|
|
65
|
+
score += 0.4;
|
|
66
|
+
} else if (digitCount >= 10 && digitCount <= 15) {
|
|
67
|
+
score += 0.25;
|
|
68
|
+
} else if (digitCount >= 7) {
|
|
69
|
+
score += 0.15;
|
|
70
|
+
}
|
|
71
|
+
if (hasPrefix(sourceText, sequence)) {
|
|
72
|
+
score += 0.15;
|
|
73
|
+
}
|
|
74
|
+
const typeCount = countObfuscationTypes(sequence.types);
|
|
75
|
+
if (typeCount >= 2 || sequence.types.includes("mixed")) {
|
|
76
|
+
score += 0.2;
|
|
77
|
+
} else if (sequence.types[0] !== "numeric") {
|
|
78
|
+
score += 0.15;
|
|
79
|
+
}
|
|
80
|
+
if (sequence.types.length === 1 && sequence.types[0] === "numeric" && digitCount === 10) {
|
|
81
|
+
score += 0.1;
|
|
82
|
+
}
|
|
83
|
+
if (digitCount < 8) {
|
|
84
|
+
score -= 0.15;
|
|
85
|
+
}
|
|
86
|
+
return Math.max(0, Math.min(1, score));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// src/locales/types.ts
|
|
90
|
+
var SEPARATORS = /* @__PURE__ */ new Set([" ", " ", "-", ".", ",", "/", "(", ")", "+", "\xA0"]);
|
|
91
|
+
var DEFAULT_MIN_DIGITS = 7;
|
|
92
|
+
var DEFAULT_MIN_CONFIDENCE = 0.6;
|
|
93
|
+
|
|
94
|
+
// src/normalize/emoji.ts
|
|
95
|
+
var CIRCLED_DIGITS = {
|
|
96
|
+
9450: "0",
|
|
97
|
+
9312: "1",
|
|
98
|
+
9313: "2",
|
|
99
|
+
9314: "3",
|
|
100
|
+
9315: "4",
|
|
101
|
+
9316: "5",
|
|
102
|
+
9317: "6",
|
|
103
|
+
9318: "7",
|
|
104
|
+
9319: "8",
|
|
105
|
+
9320: "9",
|
|
106
|
+
10102: "1",
|
|
107
|
+
10103: "2",
|
|
108
|
+
10104: "3",
|
|
109
|
+
10105: "4",
|
|
110
|
+
10106: "5",
|
|
111
|
+
10107: "6",
|
|
112
|
+
10108: "7",
|
|
113
|
+
10109: "8",
|
|
114
|
+
10110: "9"
|
|
115
|
+
};
|
|
116
|
+
function isKeycapStart(text, index) {
|
|
117
|
+
const char = text[index];
|
|
118
|
+
if (!char || !/[0-9#*]/.test(char)) return null;
|
|
119
|
+
let consumed = 1;
|
|
120
|
+
if (text[index + 1] === "\uFE0F") {
|
|
121
|
+
consumed += 1;
|
|
122
|
+
}
|
|
123
|
+
if (text[index + consumed] === "\u20E3") {
|
|
124
|
+
consumed += 1;
|
|
125
|
+
if (char === "#" || char === "*") return null;
|
|
126
|
+
return consumed;
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
function circledDigitToAscii(text, index) {
|
|
131
|
+
const code = text.codePointAt(index);
|
|
132
|
+
if (code === void 0) return null;
|
|
133
|
+
const digit = CIRCLED_DIGITS[code];
|
|
134
|
+
if (!digit) return null;
|
|
135
|
+
const length = code > 65535 ? 2 : 1;
|
|
136
|
+
return { digit, length };
|
|
137
|
+
}
|
|
138
|
+
var EMOJI_PRESCAN = /(?:[0-9#*]\uFE0F?\u20E3|[\u2460-\u2468\u24EA\u2776-\u277E])/u;
|
|
139
|
+
|
|
140
|
+
// src/normalize/homoglyph.ts
|
|
141
|
+
var HOMOGLYPH_MAP = {
|
|
142
|
+
O: "0",
|
|
143
|
+
o: "0",
|
|
144
|
+
l: "1",
|
|
145
|
+
I: "1",
|
|
146
|
+
i: "1",
|
|
147
|
+
"|": "1",
|
|
148
|
+
"!": "1",
|
|
149
|
+
S: "5",
|
|
150
|
+
s: "5",
|
|
151
|
+
B: "8",
|
|
152
|
+
Z: "2",
|
|
153
|
+
z: "2",
|
|
154
|
+
g: "9",
|
|
155
|
+
q: "9"
|
|
156
|
+
};
|
|
157
|
+
function homoglyphToDigit(char) {
|
|
158
|
+
return HOMOGLYPH_MAP[char] ?? null;
|
|
159
|
+
}
|
|
160
|
+
function isDigitLikeContext(text, index) {
|
|
161
|
+
const prev = text[index - 1];
|
|
162
|
+
const next = text[index + 1];
|
|
163
|
+
const prevIsDigitLike = prev !== void 0 && (/[0-9]/.test(prev) || homoglyphToDigit(prev) !== null || /[\s\-.,/()+]/.test(prev));
|
|
164
|
+
const nextIsDigitLike = next !== void 0 && (/[0-9]/.test(next) || homoglyphToDigit(next) !== null || /[\s\-.,/()+]/.test(next));
|
|
165
|
+
return prevIsDigitLike || nextIsDigitLike;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// src/normalize/unicode.ts
|
|
169
|
+
var INVISIBLE_CHARS = /[\u200B-\u200D\uFEFF\u2060\u180E]/g;
|
|
170
|
+
function nfkc(text) {
|
|
171
|
+
return text.normalize("NFKC");
|
|
172
|
+
}
|
|
173
|
+
function stripInvisible(text) {
|
|
174
|
+
return text.replace(INVISIBLE_CHARS, "");
|
|
175
|
+
}
|
|
176
|
+
function unicodeDigitToAscii(char) {
|
|
177
|
+
const code = char.codePointAt(0);
|
|
178
|
+
if (code === void 0) return null;
|
|
179
|
+
if (code >= 48 && code <= 57) {
|
|
180
|
+
return char;
|
|
181
|
+
}
|
|
182
|
+
if (code >= 65296 && code <= 65305) {
|
|
183
|
+
return String.fromCharCode(code - 65296 + 48);
|
|
184
|
+
}
|
|
185
|
+
if (code >= 1632 && code <= 1641) {
|
|
186
|
+
return String.fromCharCode(code - 1632 + 48);
|
|
187
|
+
}
|
|
188
|
+
if (code >= 1776 && code <= 1785) {
|
|
189
|
+
return String.fromCharCode(code - 1776 + 48);
|
|
190
|
+
}
|
|
191
|
+
if (code >= 2406 && code <= 2415) {
|
|
192
|
+
return String.fromCharCode(code - 2406 + 48);
|
|
193
|
+
}
|
|
194
|
+
const superscriptMap = {
|
|
195
|
+
8304: "0",
|
|
196
|
+
185: "1",
|
|
197
|
+
178: "2",
|
|
198
|
+
179: "3",
|
|
199
|
+
8308: "4",
|
|
200
|
+
8309: "5",
|
|
201
|
+
8310: "6",
|
|
202
|
+
8311: "7",
|
|
203
|
+
8312: "8",
|
|
204
|
+
8313: "9"
|
|
205
|
+
};
|
|
206
|
+
const superscript = superscriptMap[code];
|
|
207
|
+
if (superscript) {
|
|
208
|
+
return superscript;
|
|
209
|
+
}
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
function foldTurkish(text) {
|
|
213
|
+
return text.replace(/ı/g, "i").replace(/İ/g, "i").replace(/ş/g, "s").replace(/Ş/g, "s").replace(/ğ/g, "g").replace(/Ğ/g, "g").replace(/ü/g, "u").replace(/Ü/g, "u").replace(/ö/g, "o").replace(/Ö/g, "o").replace(/ç/g, "c").replace(/Ç/g, "c");
|
|
214
|
+
}
|
|
215
|
+
function normalizeForLookup(text) {
|
|
216
|
+
return foldTurkish(nfkc(stripInvisible(text)).toLowerCase());
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// src/normalize/word-digits.ts
|
|
220
|
+
function buildLookup(locales) {
|
|
221
|
+
const digitWords = /* @__PURE__ */ new Map();
|
|
222
|
+
const multipliers = /* @__PURE__ */ new Map();
|
|
223
|
+
for (const locale of locales) {
|
|
224
|
+
for (const [word, digit] of locale.digitWords) {
|
|
225
|
+
digitWords.set(normalizeForLookup(word), digit);
|
|
226
|
+
}
|
|
227
|
+
for (const [word, count] of locale.multipliers) {
|
|
228
|
+
multipliers.set(normalizeForLookup(word), count);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
const words = [.../* @__PURE__ */ new Set([...digitWords.keys(), ...multipliers.keys()])].sort((a, b) => b.length - a.length).map((word) => word.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
232
|
+
const wordPattern = new RegExp(`\\b(?:${words.join("|")})\\b`, "giu");
|
|
233
|
+
return { digitWords, multipliers, wordPattern };
|
|
234
|
+
}
|
|
235
|
+
function isSeparator(char) {
|
|
236
|
+
return /[\s\-.,/()+]/.test(char) || char === "\xA0";
|
|
237
|
+
}
|
|
238
|
+
function isWordChar(char) {
|
|
239
|
+
return /[\p{L}_]/u.test(char);
|
|
240
|
+
}
|
|
241
|
+
function pushDigit(tokens, digit, start, end, type, repeat = 1) {
|
|
242
|
+
for (let i = 0; i < repeat; i += 1) {
|
|
243
|
+
tokens.push({ digit, start, end, type });
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
function tokenizeDigits(text, locales) {
|
|
247
|
+
const lookup = buildLookup(locales);
|
|
248
|
+
const tokens = [];
|
|
249
|
+
let pendingRepeat = 1;
|
|
250
|
+
let index = 0;
|
|
251
|
+
while (index < text.length) {
|
|
252
|
+
const keycapLength = isKeycapStart(text, index);
|
|
253
|
+
if (keycapLength !== null) {
|
|
254
|
+
const digit = text[index];
|
|
255
|
+
pushDigit(tokens, digit, index, index + keycapLength, "emoji", pendingRepeat);
|
|
256
|
+
pendingRepeat = 1;
|
|
257
|
+
index += keycapLength;
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
const circled = circledDigitToAscii(text, index);
|
|
261
|
+
if (circled) {
|
|
262
|
+
pushDigit(tokens, circled.digit, index, index + circled.length, "emoji", pendingRepeat);
|
|
263
|
+
pendingRepeat = 1;
|
|
264
|
+
index += circled.length;
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
const char = text[index];
|
|
268
|
+
if (isWordChar(char)) {
|
|
269
|
+
let end = index + 1;
|
|
270
|
+
while (end < text.length && isWordChar(text[end])) {
|
|
271
|
+
end += 1;
|
|
272
|
+
}
|
|
273
|
+
if (end === index + 1) {
|
|
274
|
+
const homoglyph2 = homoglyphToDigit(char);
|
|
275
|
+
if (homoglyph2 && isDigitLikeContext(text, index)) {
|
|
276
|
+
pushDigit(tokens, homoglyph2, index, index + 1, "homoglyph", pendingRepeat);
|
|
277
|
+
pendingRepeat = 1;
|
|
278
|
+
index += 1;
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
const rawWord = text.slice(index, end);
|
|
283
|
+
const normalizedWord = normalizeForLookup(rawWord);
|
|
284
|
+
const multiplier = lookup.multipliers.get(normalizedWord);
|
|
285
|
+
if (multiplier !== void 0) {
|
|
286
|
+
pendingRepeat = multiplier;
|
|
287
|
+
index = end;
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
const digit = lookup.digitWords.get(normalizedWord);
|
|
291
|
+
if (digit !== void 0) {
|
|
292
|
+
pushDigit(tokens, digit, index, end, "word", pendingRepeat);
|
|
293
|
+
pendingRepeat = 1;
|
|
294
|
+
index = end;
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
index = end;
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
const asciiDigit = unicodeDigitToAscii(char);
|
|
301
|
+
if (asciiDigit) {
|
|
302
|
+
pushDigit(tokens, asciiDigit, index, index + 1, "numeric", pendingRepeat);
|
|
303
|
+
pendingRepeat = 1;
|
|
304
|
+
index += 1;
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
const homoglyph = homoglyphToDigit(char);
|
|
308
|
+
if (homoglyph && isDigitLikeContext(text, index)) {
|
|
309
|
+
pushDigit(tokens, homoglyph, index, index + 1, "homoglyph", pendingRepeat);
|
|
310
|
+
pendingRepeat = 1;
|
|
311
|
+
index += 1;
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
if (isSeparator(char)) {
|
|
315
|
+
index += 1;
|
|
316
|
+
continue;
|
|
317
|
+
}
|
|
318
|
+
pendingRepeat = 1;
|
|
319
|
+
index += 1;
|
|
320
|
+
}
|
|
321
|
+
return tokens;
|
|
322
|
+
}
|
|
323
|
+
function hasLocaleWordSignal(text, locales) {
|
|
324
|
+
const lookup = buildLookup(locales);
|
|
325
|
+
const pattern = lookup.wordPattern;
|
|
326
|
+
pattern.lastIndex = 0;
|
|
327
|
+
return pattern.test(text);
|
|
328
|
+
}
|
|
329
|
+
function isMultiplierSpan(text, from, to, locales) {
|
|
330
|
+
const slice = text.slice(from, to).trim();
|
|
331
|
+
if (!slice) {
|
|
332
|
+
return true;
|
|
333
|
+
}
|
|
334
|
+
const lookup = buildLookup(locales);
|
|
335
|
+
const words = slice.split(/\s+/);
|
|
336
|
+
return words.every((word) => lookup.multipliers.has(normalizeForLookup(word)));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// src/match/sequence.ts
|
|
340
|
+
function onlySeparatorsBetween(text, from, to, locales) {
|
|
341
|
+
if (from >= to) {
|
|
342
|
+
return true;
|
|
343
|
+
}
|
|
344
|
+
if (isMultiplierSpan(text, from, to, locales)) {
|
|
345
|
+
return true;
|
|
346
|
+
}
|
|
347
|
+
for (let i = from; i < to; i += 1) {
|
|
348
|
+
const char = text[i];
|
|
349
|
+
if (!SEPARATORS.has(char)) {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return true;
|
|
354
|
+
}
|
|
355
|
+
function collectTypes(tokens) {
|
|
356
|
+
const unique = new Set(tokens.map((token) => token.type));
|
|
357
|
+
if (unique.size > 1) {
|
|
358
|
+
return ["mixed"];
|
|
359
|
+
}
|
|
360
|
+
return [...unique];
|
|
361
|
+
}
|
|
362
|
+
function findDigitSequences(text, tokens, minDigits, locales = []) {
|
|
363
|
+
if (tokens.length === 0) {
|
|
364
|
+
return [];
|
|
365
|
+
}
|
|
366
|
+
const sequences = [];
|
|
367
|
+
let group = [tokens[0]];
|
|
368
|
+
for (let i = 1; i < tokens.length; i += 1) {
|
|
369
|
+
const prev = tokens[i - 1];
|
|
370
|
+
const current = tokens[i];
|
|
371
|
+
if (onlySeparatorsBetween(text, prev.end, current.start, locales)) {
|
|
372
|
+
group.push(current);
|
|
373
|
+
continue;
|
|
374
|
+
}
|
|
375
|
+
if (group.length >= minDigits) {
|
|
376
|
+
sequences.push(toSequence(group));
|
|
377
|
+
}
|
|
378
|
+
group = [current];
|
|
379
|
+
}
|
|
380
|
+
if (group.length >= minDigits) {
|
|
381
|
+
sequences.push(toSequence(group));
|
|
382
|
+
}
|
|
383
|
+
return sequences;
|
|
384
|
+
}
|
|
385
|
+
function toSequence(tokens) {
|
|
386
|
+
const first = tokens[0];
|
|
387
|
+
const last = tokens[tokens.length - 1];
|
|
388
|
+
return {
|
|
389
|
+
tokens,
|
|
390
|
+
start: first.start,
|
|
391
|
+
end: last.end,
|
|
392
|
+
normalized: tokens.map((token) => token.digit).join(""),
|
|
393
|
+
types: collectTypes(tokens)
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// src/locales/build-locale.ts
|
|
398
|
+
function createLocale(id, digitWords, multipliers = {}) {
|
|
399
|
+
const digitMap = new Map(Object.entries(digitWords));
|
|
400
|
+
const multiplierMap = new Map(Object.entries(multipliers));
|
|
401
|
+
const words = [...digitMap.keys(), ...multiplierMap.keys()].sort((a, b) => b.length - a.length).map(escapeRegex);
|
|
402
|
+
const preScanPattern = new RegExp(
|
|
403
|
+
`(?:${words.join("|")})`,
|
|
404
|
+
"iu"
|
|
405
|
+
);
|
|
406
|
+
return {
|
|
407
|
+
id,
|
|
408
|
+
digitWords: digitMap,
|
|
409
|
+
multipliers: multiplierMap,
|
|
410
|
+
preScanPattern
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
function escapeRegex(value) {
|
|
414
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// src/locales/en.ts
|
|
418
|
+
var en = createLocale(
|
|
419
|
+
"en",
|
|
420
|
+
{
|
|
421
|
+
zero: "0",
|
|
422
|
+
oh: "0",
|
|
423
|
+
one: "1",
|
|
424
|
+
two: "2",
|
|
425
|
+
three: "3",
|
|
426
|
+
four: "4",
|
|
427
|
+
five: "5",
|
|
428
|
+
six: "6",
|
|
429
|
+
seven: "7",
|
|
430
|
+
eight: "8",
|
|
431
|
+
nine: "9"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
double: 2,
|
|
435
|
+
triple: 3,
|
|
436
|
+
quad: 4
|
|
437
|
+
}
|
|
438
|
+
);
|
|
439
|
+
|
|
440
|
+
// src/locales/tr.ts
|
|
441
|
+
var tr = createLocale(
|
|
442
|
+
"tr",
|
|
443
|
+
{
|
|
444
|
+
sifir: "0",
|
|
445
|
+
s\u0131f\u0131r: "0",
|
|
446
|
+
bir: "1",
|
|
447
|
+
iki: "2",
|
|
448
|
+
uc: "3",
|
|
449
|
+
\u00FC\u00E7: "3",
|
|
450
|
+
dort: "4",
|
|
451
|
+
d\u00F6rt: "4",
|
|
452
|
+
bes: "5",
|
|
453
|
+
be\u015F: "5",
|
|
454
|
+
alti: "6",
|
|
455
|
+
alt\u0131: "6",
|
|
456
|
+
yedi: "7",
|
|
457
|
+
sekiz: "8",
|
|
458
|
+
dokuz: "9"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
cift: 2,
|
|
462
|
+
\u00E7ift: 2,
|
|
463
|
+
uclu: 3,
|
|
464
|
+
\u00FC\u00E7l\u00FC: 3,
|
|
465
|
+
dortlu: 4,
|
|
466
|
+
d\u00F6rtl\u00FC: 4
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
|
|
470
|
+
// src/pipeline/options.ts
|
|
471
|
+
function resolveOptions(options) {
|
|
472
|
+
return {
|
|
473
|
+
locales: options?.locales ?? [tr, en],
|
|
474
|
+
minDigits: options?.minDigits ?? DEFAULT_MIN_DIGITS,
|
|
475
|
+
minConfidence: options?.minConfidence ?? DEFAULT_MIN_CONFIDENCE,
|
|
476
|
+
countryHint: options?.countryHint ?? "TR"
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// src/pipeline/quick-check.ts
|
|
481
|
+
function quickCheck(text, options) {
|
|
482
|
+
if (!text || text.length === 0) {
|
|
483
|
+
return false;
|
|
484
|
+
}
|
|
485
|
+
const resolved = resolveOptions(options);
|
|
486
|
+
if (/\d/.test(text)) {
|
|
487
|
+
return true;
|
|
488
|
+
}
|
|
489
|
+
if (/\p{Nd}/u.test(text)) {
|
|
490
|
+
return true;
|
|
491
|
+
}
|
|
492
|
+
if (EMOJI_PRESCAN.test(text)) {
|
|
493
|
+
return true;
|
|
494
|
+
}
|
|
495
|
+
if (hasLocaleWordSignal(text, resolved.locales)) {
|
|
496
|
+
return true;
|
|
497
|
+
}
|
|
498
|
+
for (const locale of resolved.locales) {
|
|
499
|
+
locale.preScanPattern.lastIndex = 0;
|
|
500
|
+
if (locale.preScanPattern.test(text)) {
|
|
501
|
+
return true;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
if (/[+]\s*[\d\p{Nd}\s\-().]{4,}/u.test(text)) {
|
|
505
|
+
return true;
|
|
506
|
+
}
|
|
507
|
+
if (/(?:[\d\p{Nd}][\s.\-/)]{0,3}){3,}[\d\p{Nd}]/u.test(text)) {
|
|
508
|
+
return true;
|
|
509
|
+
}
|
|
510
|
+
return false;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// src/pipeline/detect.ts
|
|
514
|
+
function detect(text, options) {
|
|
515
|
+
if (!quickCheck(text, options)) {
|
|
516
|
+
return { detected: false, matches: [] };
|
|
517
|
+
}
|
|
518
|
+
const resolved = resolveOptions(options);
|
|
519
|
+
const tokens = tokenizeDigits(text, resolved.locales);
|
|
520
|
+
const sequences = findDigitSequences(text, tokens, resolved.minDigits, resolved.locales);
|
|
521
|
+
const matches = [];
|
|
522
|
+
for (const sequence of sequences) {
|
|
523
|
+
if (isFalsePositive(sequence, text)) {
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
const confidence = scoreSequence(sequence, text, resolved);
|
|
527
|
+
if (confidence < resolved.minConfidence) {
|
|
528
|
+
continue;
|
|
529
|
+
}
|
|
530
|
+
matches.push({
|
|
531
|
+
start: sequence.start,
|
|
532
|
+
end: sequence.end,
|
|
533
|
+
text: text.slice(sequence.start, sequence.end),
|
|
534
|
+
normalized: sequence.normalized,
|
|
535
|
+
confidence,
|
|
536
|
+
types: sequence.types
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
return {
|
|
540
|
+
detected: matches.length > 0,
|
|
541
|
+
matches
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// src/pipeline/mask.ts
|
|
546
|
+
function mask(text, options) {
|
|
547
|
+
const result = detect(text, options);
|
|
548
|
+
if (!result.detected) {
|
|
549
|
+
return text;
|
|
550
|
+
}
|
|
551
|
+
const char = options?.char ?? "#";
|
|
552
|
+
const chars = [...text];
|
|
553
|
+
const sorted = [...result.matches].sort((a, b) => b.start - a.start);
|
|
554
|
+
for (const match of sorted) {
|
|
555
|
+
for (let i = match.start; i < match.end; i += 1) {
|
|
556
|
+
if (!/\s/.test(chars[i] ?? "")) {
|
|
557
|
+
chars[i] = char;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
return chars.join("");
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export { detect, en, mask, quickCheck, tr };
|
|
565
|
+
//# sourceMappingURL=index.js.map
|
|
566
|
+
//# sourceMappingURL=index.js.map
|