{"_id":"@claudiu-ceia/ts-duckling","_rev":"9-03e1f131acc77856a617082223d4aff6","name":"@claudiu-ceia/ts-duckling","dist-tags":{"latest":"0.7.3"},"versions":{"0.4.0":{"name":"@claudiu-ceia/ts-duckling","version":"0.4.0","keywords":["entity-extraction","parser","pii","redaction","typescript"],"license":"MIT","_id":"@claudiu-ceia/ts-duckling@0.4.0","maintainers":[{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"}],"homepage":"https://github.com/ClaudiuCeia/ts-duckling#readme","bugs":{"url":"https://github.com/ClaudiuCeia/ts-duckling/issues"},"dist":{"shasum":"7e14e46c96c1d2b3967bf42c082313a8ebdf8f6f","tarball":"https://registry.npmjs.org/@claudiu-ceia/ts-duckling/-/ts-duckling-0.4.0.tgz","fileCount":88,"integrity":"sha512-H7zHmPAsGboNE1sm5XEfD1dlsrRuzUnghXF1cY21fOlti9HS7EeKVSC5NojwoMzUCJvE11dyEpoyZUEWUhbVNA==","signatures":[{"sig":"MEYCIQDKgTT1+cH5+s/Hv0qM4qwNPxElZiOaIyOLL83YC42vZAIhAJDF3el+b7+kiecI0kX+5vR6CU3L0isUNxWV49maHplk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@claudiu-ceia%2fts-duckling@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":298621},"module":"./esm/mod.js","engines":{"node":">=18"},"exports":{".":{"import":"./esm/mod.js"}},"gitHead":"0a093709898819c8f18c61365f62bf05ad2d68bf","_npmUser":{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"},"repository":{"url":"git+https://github.com/ClaudiuCeia/ts-duckling.git","type":"git"},"_npmVersion":"10.9.8","description":"A tiny, deterministic entity extractor for TypeScript.","directories":{},"_nodeVersion":"22.23.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ts-duckling_0.4.0_1784931001305_0.7521162925959122","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@claudiu-ceia/ts-duckling","version":"0.5.0","keywords":["entity-extraction","parser","pii","redaction","typescript"],"license":"MIT","_id":"@claudiu-ceia/ts-duckling@0.5.0","maintainers":[{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"}],"homepage":"https://github.com/ClaudiuCeia/ts-duckling#readme","bugs":{"url":"https://github.com/ClaudiuCeia/ts-duckling/issues"},"dist":{"shasum":"cbd7b594eb29db34ec0db1f20cfa60f8194c576c","tarball":"https://registry.npmjs.org/@claudiu-ceia/ts-duckling/-/ts-duckling-0.5.0.tgz","fileCount":88,"integrity":"sha512-OEJ4d4TgACMbo2m6P6yknxq89GNyAyDvaux88elL7UYuIsAvTFRY5e74RsfIR8C7PFuOO2BIwtnZAuoUqzERow==","signatures":[{"sig":"MEUCIQDfKPrNyNHX3fG9H6TvzBqt7KW3HoeVQXCxwVVpukEwHgIgF5O2R6F3NiKgAKy6RYlNIz1PXubKcQUifuCoSfL1eQo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@claudiu-ceia%2fts-duckling@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":301836},"module":"./esm/mod.js","engines":{"node":">=18"},"exports":{".":{"import":"./esm/mod.js"}},"gitHead":"04b76c9c1286c0272322fdd0791a65323ef39981","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e78b66-ee56-4b07-b49b-33064ba3d904"}},"repository":{"url":"git+https://github.com/ClaudiuCeia/ts-duckling.git","type":"git"},"_npmVersion":"11.16.0","description":"A tiny, deterministic entity extractor for TypeScript.","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ts-duckling_0.5.0_1784932691704_0.7418174743075441","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@claudiu-ceia/ts-duckling","version":"0.6.0","keywords":["entity-extraction","parser","pii","redaction","typescript"],"license":"MIT","_id":"@claudiu-ceia/ts-duckling@0.6.0","maintainers":[{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"}],"homepage":"https://github.com/ClaudiuCeia/ts-duckling#readme","bugs":{"url":"https://github.com/ClaudiuCeia/ts-duckling/issues"},"dist":{"shasum":"211730a502c46f40b1a1b9ab1ac5836790d7addd","tarball":"https://registry.npmjs.org/@claudiu-ceia/ts-duckling/-/ts-duckling-0.6.0.tgz","fileCount":91,"integrity":"sha512-8B4Fm6DmQA0i3J4dN/d5Gb+trUUV1EZDlyXtUAKdXDQhQwhp4pXisSM2ge38wePUDZD3wweVpMxlCS0TYsShaQ==","signatures":[{"sig":"MEUCIQDQT/MHCN3TVzOLCLaPXcviO7sBscBTaV3ZtVZulRj6ZAIgEPFKY49Sy5OX5yLWw0Bpc/MFKdqIr2hpDBCe8fFBZM0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@claudiu-ceia%2fts-duckling@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":316483},"module":"./esm/mod.js","engines":{"node":">=18"},"exports":{".":{"import":"./esm/mod.js"}},"gitHead":"81b5970250800cf093f89ef450d667a1d76d9109","scripts":{},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e78b66-ee56-4b07-b49b-33064ba3d904"}},"repository":{"url":"git+https://github.com/ClaudiuCeia/ts-duckling.git","type":"git"},"_npmVersion":"11.16.0","description":"A tiny, deterministic entity extractor for TypeScript.","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ts-duckling_0.6.0_1784940939837_0.11666271635210168","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@claudiu-ceia/ts-duckling","version":"0.6.1","keywords":["entity-extraction","parser","pii","redaction","typescript"],"license":"MIT","_id":"@claudiu-ceia/ts-duckling@0.6.1","maintainers":[{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"}],"homepage":"https://github.com/ClaudiuCeia/ts-duckling#readme","bugs":{"url":"https://github.com/ClaudiuCeia/ts-duckling/issues"},"dist":{"shasum":"82d08ca2c5f9f37cf8a17275fa02cc39d19dcc7f","tarball":"https://registry.npmjs.org/@claudiu-ceia/ts-duckling/-/ts-duckling-0.6.1.tgz","fileCount":89,"integrity":"sha512-gZRQC6Tmx83Cc0klWOm48+hDBQycO8DVJWmpvjFqGPZPtY3ZHox7AjCDBHeps/cx40e86yn+rngFsUy72UWbgw==","signatures":[{"sig":"MEQCIC9QtMfv1OpXQA01/Kg5wVcCt6zXh6GLrtqjXNI0GvAlAiBDS4YtMFk/yvGNageVijn0yx0a/cMcf87AWEvyUNxVoQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@claudiu-ceia%2fts-duckling@0.6.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":315482},"module":"./esm/mod.js","engines":{"node":">=18"},"exports":{".":{"import":"./esm/mod.js"}},"gitHead":"0ead1f9d605d8f1018ad147ec726603596da1952","scripts":{},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e78b66-ee56-4b07-b49b-33064ba3d904"}},"repository":{"url":"git+https://github.com/ClaudiuCeia/ts-duckling.git","type":"git"},"_npmVersion":"11.17.0","description":"A tiny, deterministic entity extractor for TypeScript.","directories":{},"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ts-duckling_0.6.1_1787962327155_0.6005458492336919","host":"s3://npm-registry-packages-npm-production"}},"0.6.2":{"name":"@claudiu-ceia/ts-duckling","version":"0.6.2","keywords":["entity-extraction","parser","pii","redaction","typescript"],"license":"MIT","_id":"@claudiu-ceia/ts-duckling@0.6.2","maintainers":[{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"}],"homepage":"https://github.com/ClaudiuCeia/ts-duckling#readme","bugs":{"url":"https://github.com/ClaudiuCeia/ts-duckling/issues"},"dist":{"shasum":"e4bbbd902d442fbe9fba90095a7f85c2f2832de0","tarball":"https://registry.npmjs.org/@claudiu-ceia/ts-duckling/-/ts-duckling-0.6.2.tgz","fileCount":89,"integrity":"sha512-8xUVZO2SDBDTQSWqzTk7V06XgkHU6rg+tGIQIUWQ8M8JipZJVMQ82tZfjESc8k5DmWDaqwFfNBb686D64HeVkA==","signatures":[{"sig":"MEUCIG4TqsLnZkUXrxwf4fISuZmlpsklA+a+Q6n5+t2USuFjAiEAoyxAOp/R5gEf/XSpAAXu1GltK4brYeGf7PPzRlFsS84=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@claudiu-ceia%2fts-duckling@0.6.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":316673},"module":"./esm/mod.js","engines":{"node":">=18"},"exports":{".":{"import":"./esm/mod.js"}},"gitHead":"c03a5bd07115bc3c7a964b664d777ddf5fb5de40","scripts":{},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e78b66-ee56-4b07-b49b-33064ba3d904"}},"repository":{"url":"git+https://github.com/ClaudiuCeia/ts-duckling.git","type":"git"},"_npmVersion":"11.17.0","description":"A tiny, deterministic entity extractor for TypeScript.","directories":{},"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ts-duckling_0.6.2_1788205786939_0.0710374984912523","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@claudiu-ceia/ts-duckling","version":"0.7.0","keywords":["bun","deno","entity-extraction","parser","pii","redaction","typescript"],"license":"MIT","_id":"@claudiu-ceia/ts-duckling@0.7.0","maintainers":[{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"}],"homepage":"https://github.com/ClaudiuCeia/ts-duckling#readme","bugs":{"url":"https://github.com/ClaudiuCeia/ts-duckling/issues"},"dist":{"shasum":"bee84d00e95fd1557b83c1f3f4ff21d71b0e5c48","tarball":"https://registry.npmjs.org/@claudiu-ceia/ts-duckling/-/ts-duckling-0.7.0.tgz","fileCount":62,"integrity":"sha512-UXqXgDBlM7kPabQcj9kTQE2Yvs15DRIjfjcKndsUQal5XXTjNlyi63zx4ayg3b4fJ1CRHEImPdbwcPL/AE/LuQ==","signatures":[{"sig":"MEQCIDxJnK5k2hX8BDjIuajpCeBarEFHSpIwbsyCGf/i/xkFAiBCOo+x6c8Fpzc8enlUVOS8+zBickZSy49egVi8y+lqyQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@claudiu-ceia%2fts-duckling@0.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":210573},"type":"module","types":"./dist/mod.d.ts","engines":{"node":">=24"},"exports":{".":{"types":"./dist/mod.d.ts","import":"./dist/mod.js"}},"gitHead":"bbea294bb316a774d3949ab10802bdae4ab0f8ef","scripts":{"lint":"oxlint --deny-warnings mod.ts src tests bench scripts","test":"bun test ./tests","bench":"bun run bench/extract.bench.ts && bun run bench/vocabulary.bench.ts","build":"rm -rf dist && tsc -p tsconfig.build.json","check":"bun run format:check && bun run lint && bun run typecheck && bun run test","format":"oxfmt mod.ts src tests bench scripts package.json deno.json tsconfig.json tsconfig.build.json","prepack":"bun run build","coverage":"bun test --coverage ./tests","typecheck":"tsc -p tsconfig.json","update:data":"bun run scripts/update_data.ts","format:check":"oxfmt --check mod.ts src tests bench scripts package.json deno.json tsconfig.json tsconfig.build.json","bench:extract":"bun run bench/extract.bench.ts","hooks:install":"ln -sf ../../scripts/pre-commit .git/hooks/pre-commit && chmod +x scripts/pre-commit","package:check":"bun run build && publint && attw --pack . --profile esm-only","hooks:uninstall":"rm -f .git/hooks/pre-commit","bench:vocabulary":"bun run bench/vocabulary.bench.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e78b66-ee56-4b07-b49b-33064ba3d904"}},"repository":{"url":"git+https://github.com/ClaudiuCeia/ts-duckling.git","type":"git"},"_npmVersion":"11.19.0","description":"A tiny, deterministic entity extractor for TypeScript.","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"@std/crypto":"https://npm.jsr.io/~/11/@jsr/std__crypto/1.1.0.tgz","@claudiu-ceia/combine":"0.8.1"},"_hasShrinkwrap":false,"packageManager":"bun@1.4.0","devDependencies":{"oxfmt":"0.65.0","mitata":"1.0.34","oxlint":"1.80.0","publint":"0.3.24","@types/bun":"1.4.0","typescript":"~5.9.0","@arethetypeswrong/cli":"0.18.5"},"_npmOperationalInternal":{"tmp":"tmp/ts-duckling_0.7.0_1788654366916_0.3354030236453822","host":"s3://npm-registry-packages-npm-production"}},"0.7.1":{"name":"@claudiu-ceia/ts-duckling","version":"0.7.1","keywords":["browser","bun","date-parser","deno","entity-extraction","nlp","nodejs","parser-combinators","pii-detection","sensitive-data","structured-data","text-parsing","time-parser","typescript","url-parser"],"license":"MIT","_id":"@claudiu-ceia/ts-duckling@0.7.1","maintainers":[{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"}],"homepage":"https://claudiuceia.github.io/ts-duckling/","bugs":{"url":"https://github.com/ClaudiuCeia/ts-duckling/issues"},"dist":{"shasum":"33bd5f7df63f91173d0e54ff6f5ab0a7ab235676","tarball":"https://registry.npmjs.org/@claudiu-ceia/ts-duckling/-/ts-duckling-0.7.1.tgz","fileCount":62,"integrity":"sha512-ksx/PO5rN9z5inKTxRw4bm09Zz4M6tThaK4s+YWFdh1IPR/+GfEWukVrGQuLfmyn/UCWsqzbLDGaVkLb84jk5A==","signatures":[{"sig":"MEYCIQDKnQKDJJOzrgPuCNiBguD2ACujjag8BJDzkIerulYxHQIhAJVdcGAOMcxFaPukGh0DYqPzdt0REp/1lfhTEGdX/R99","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@claudiu-ceia%2fts-duckling@0.7.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":204657},"type":"module","types":"./dist/mod.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/mod.d.ts","import":"./dist/mod.js"}},"gitHead":"3717c170b90acc4f0f43ed2cfae1e9c494c674ef","scripts":{"lint":"oxlint --deny-warnings mod.ts src tests examples docs/examples bench scripts","test":"bun test ./tests","bench":"bun run bench/extract.bench.ts && bun run bench/vocabulary.bench.ts","build":"rm -rf dist && tsc -p tsconfig.build.json","check":"bun run format:check && bun run lint && bun run typecheck && bun run metadata:check && bun run test","format":"oxfmt mod.ts src tests examples docs/examples bench scripts package.json deno.json tsconfig.json tsconfig.build.json README.md","prepack":"bun run build","coverage":"bun test --coverage ./tests","docs:dev":"bun run --cwd docs dev","typecheck":"tsc -p tsconfig.json","docs:build":"bun run --cwd docs build","update:data":"bun run scripts/update_data.ts","format:check":"oxfmt --check mod.ts src tests examples docs/examples bench scripts package.json deno.json tsconfig.json tsconfig.build.json README.md","bench:extract":"bun run bench/extract.bench.ts","hooks:install":"ln -sf ../../scripts/pre-commit .git/hooks/pre-commit && chmod +x scripts/pre-commit","package:check":"bun run build && bun run examples:check && publint && attw --pack . --profile esm-only","examples:check":"bun test ./examples && bun test --cwd docs ./examples","metadata:check":"bun run scripts/check_metadata.ts","hooks:uninstall":"rm -f .git/hooks/pre-commit","bench:vocabulary":"bun run bench/vocabulary.bench.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e78b66-ee56-4b07-b49b-33064ba3d904"}},"repository":{"url":"git+https://github.com/ClaudiuCeia/ts-duckling.git","type":"git"},"workspaces":["docs"],"_npmVersion":"11.19.0","description":"Extract typed dates, times, URLs, countries, quantities, and sensitive values from text.","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"@std/crypto":"https://npm.jsr.io/~/11/@jsr/std__crypto/1.1.0.tgz","@claudiu-ceia/combine":"0.11.2"},"_hasShrinkwrap":false,"packageManager":"bun@1.4.0","devDependencies":{"oxfmt":"0.65.0","mitata":"1.0.34","oxlint":"1.80.0","publint":"0.3.24","@types/bun":"1.4.0","typescript":"~5.9.0","@arethetypeswrong/cli":"0.18.5"},"_npmOperationalInternal":{"tmp":"tmp/ts-duckling_0.7.1_1788659080127_0.725238777948138","host":"s3://npm-registry-packages-npm-production"}},"0.7.2":{"name":"@claudiu-ceia/ts-duckling","version":"0.7.2","keywords":["browser","bun","date-parser","deno","entity-extraction","nlp","nodejs","parser-combinators","pii-detection","sensitive-data","structured-data","text-parsing","time-parser","typescript","url-parser"],"license":"MIT","_id":"@claudiu-ceia/ts-duckling@0.7.2","maintainers":[{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"}],"homepage":"https://claudiuceia.github.io/ts-duckling/","bugs":{"url":"https://github.com/ClaudiuCeia/ts-duckling/issues"},"dist":{"shasum":"567cd6351ca441d2d694d1a3d7b6f81c496ffd6a","tarball":"https://registry.npmjs.org/@claudiu-ceia/ts-duckling/-/ts-duckling-0.7.2.tgz","fileCount":62,"integrity":"sha512-pDAoX408Hvnqix3AlLuKnerj9iizh9Vt58i0hJQ57AKJID9/YKfMsIjBywGdqFY4ob7SjzS9wO4oFRbneg44lA==","signatures":[{"sig":"MEYCIQCiGcKh2GM/qVloPDzSGy+yK2KC1I20Kt7K8hAS0Y3r5QIhAP7MwNOn3LjNOSOIYsH0lhwIEtW+vQ8Hu6Hwvwh4wiBi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@claudiu-ceia%2fts-duckling@0.7.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":204495},"type":"module","types":"./dist/mod.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/mod.d.ts","import":"./dist/mod.js"}},"gitHead":"e147e33745d95c0ff502fd46855b2f8caa1838b8","scripts":{"lint":"oxlint --deny-warnings mod.ts src tests examples docs/examples bench scripts","test":"bun test ./tests","bench":"bun run bench/extract.bench.ts && bun run bench/vocabulary.bench.ts","build":"rm -rf dist && tsc -p tsconfig.build.json","check":"bun run format:check && bun run lint && bun run typecheck && bun run metadata:check && bun run test","format":"oxfmt mod.ts src tests examples docs/examples bench scripts package.json deno.json tsconfig.json tsconfig.build.json README.md","prepack":"bun run build","coverage":"bun test --coverage ./tests","docs:dev":"bun run --cwd docs dev","typecheck":"tsc -p tsconfig.json","docs:build":"bun run --cwd docs build","update:data":"bun run scripts/update_data.ts","format:check":"oxfmt --check mod.ts src tests examples docs/examples bench scripts package.json deno.json tsconfig.json tsconfig.build.json README.md","bench:extract":"bun run bench/extract.bench.ts","hooks:install":"ln -sf ../../scripts/pre-commit .git/hooks/pre-commit && chmod +x scripts/pre-commit","package:check":"bun run build && bun run examples:check && publint && attw --pack . --profile esm-only","examples:check":"bun test ./examples && bun test --cwd docs ./examples","metadata:check":"bun run scripts/check_metadata.ts","hooks:uninstall":"rm -f .git/hooks/pre-commit","bench:vocabulary":"bun run bench/vocabulary.bench.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e78b66-ee56-4b07-b49b-33064ba3d904"}},"repository":{"url":"git+https://github.com/ClaudiuCeia/ts-duckling.git","type":"git"},"workspaces":["docs"],"_npmVersion":"11.19.0","description":"Extract typed dates, times, URLs, countries, quantities, and sensitive values from text.","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"@noble/hashes":"2.4.0","@claudiu-ceia/combine":"0.11.2"},"_hasShrinkwrap":false,"packageManager":"bun@1.4.0","devDependencies":{"oxfmt":"0.65.0","mitata":"1.0.34","oxlint":"1.80.0","publint":"0.3.24","@types/bun":"1.4.0","typescript":"~5.9.0","@arethetypeswrong/cli":"0.18.5"},"_npmOperationalInternal":{"tmp":"tmp/ts-duckling_0.7.2_1788711043978_0.6667006135446485","host":"s3://npm-registry-packages-npm-production"}},"0.7.3":{"_id":"@claudiu-ceia/ts-duckling@0.7.3","bugs":{"url":"https://github.com/ClaudiuCeia/ts-duckling/issues"},"dist":{"shasum":"acb3394ceebc8a2fe586ebaf69a7996c1becb4ec","tarball":"https://registry.npmjs.org/@claudiu-ceia/ts-duckling/-/ts-duckling-0.7.3.tgz","fileCount":62,"integrity":"sha512-Xip5pGgcva6RWXPK/RVyEzHPnbFXkobB5k+EQ56GzvSmPNcu17C2xf+nqtcQ+M+6KYoXxBRkpz+1UvujIcTATQ==","signatures":[{"sig":"MEQCIHhubhWyPItb8WOiYjneMiwn1oF5d5lAUD1aucjzWro3AiArGhgg6JJa1MvzuZobwKPR9wHxDEd6d/EURpJTquteAA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICSDq0Q+Zvv8tC4OYJ4Iui+/FefypUrYs63xTv3XbMMzAiEA1/fRgr7gfimg4N+oiIvt+oy5iour1yqq5finn1rw3H4="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@claudiu-ceia%2fts-duckling@0.7.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":257625},"name":"@claudiu-ceia/ts-duckling","type":"module","types":"./dist/mod.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/mod.d.ts","import":"./dist/mod.js"}},"gitHead":"3e9d1ab5f382c1c2ef1cbe3221fa79bb3eb66f24","license":"MIT","scripts":{"lint":"oxlint --deny-warnings mod.ts src tests examples docs/examples bench scripts","test":"bun test ./tests","bench":"bun run bench/extract.bench.ts && bun run bench/vocabulary.bench.ts","build":"rm -rf dist && tsc -p tsconfig.build.json","check":"bun run format:check && bun run lint && bun run typecheck && bun run metadata:check && bun run test","format":"oxfmt mod.ts src tests examples docs/examples bench scripts package.json deno.json tsconfig.json tsconfig.build.json README.md","prepack":"bun run build","coverage":"bun test --coverage ./tests","docs:dev":"bun run --cwd docs dev","typecheck":"tsc -p tsconfig.json","docs:build":"bun run --cwd docs build","update:data":"bun run scripts/update_data.ts","format:check":"oxfmt --check mod.ts src tests examples docs/examples bench scripts package.json deno.json tsconfig.json tsconfig.build.json README.md","bench:extract":"bun run bench/extract.bench.ts","hooks:install":"ln -sf ../../scripts/pre-commit .git/hooks/pre-commit && chmod +x scripts/pre-commit","package:check":"bun run build && bun run examples:check && publint && attw --pack . --profile esm-only","examples:check":"bun test ./examples && bun test --cwd docs ./examples","metadata:check":"bun run scripts/check_metadata.ts","hooks:uninstall":"rm -f .git/hooks/pre-commit","bench:vocabulary":"bun run bench/vocabulary.bench.ts"},"version":"0.7.3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e78b66-ee56-4b07-b49b-33064ba3d904"}},"homepage":"https://claudiuceia.github.io/ts-duckling/","keywords":["browser","bun","date-parser","deno","entity-extraction","nlp","nodejs","parser-combinators","pii-detection","sensitive-data","structured-data","text-parsing","time-parser","typescript","url-parser"],"repository":{"url":"git+https://github.com/ClaudiuCeia/ts-duckling.git","type":"git"},"workspaces":["docs"],"_npmVersion":"11.19.0","description":"Extract typed dates, times, URLs, countries, quantities, and sensitive values from text.","directories":{},"maintainers":[{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"entities":"8.1.0","@noble/hashes":"2.4.0","@claudiu-ceia/combine":"0.11.2"},"_hasShrinkwrap":false,"packageManager":"bun@1.4.0","devDependencies":{"oxfmt":"0.68.0","mitata":"1.0.34","oxlint":"1.83.0","publint":"0.3.24","@types/bun":"1.4.2","typescript":"~7.0.0","@arethetypeswrong/cli":"0.18.5"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ts-duckling_0.7.3_1789946855653_0.19147576316276926"}}},"time":{"created":"2026-07-24T22:10:01.156Z","modified":"2026-09-20T23:27:36.147Z","0.4.0":"2026-07-24T22:10:01.522Z","0.5.0":"2026-07-24T22:38:11.846Z","0.6.0":"2026-07-25T00:55:39.999Z","0.6.1":"2026-08-29T00:12:07.350Z","0.6.2":"2026-08-31T19:49:47.090Z","0.7.0":"2026-09-06T00:26:07.054Z","0.7.1":"2026-09-06T01:44:40.293Z","0.7.2":"2026-09-06T16:10:44.133Z","0.7.3":"2026-09-20T23:27:35.768Z"},"bugs":{"url":"https://github.com/ClaudiuCeia/ts-duckling/issues"},"license":"MIT","homepage":"https://claudiuceia.github.io/ts-duckling/","keywords":["browser","bun","date-parser","deno","entity-extraction","nlp","nodejs","parser-combinators","pii-detection","sensitive-data","structured-data","text-parsing","time-parser","typescript","url-parser"],"repository":{"url":"git+https://github.com/ClaudiuCeia/ts-duckling.git","type":"git"},"description":"Extract typed dates, times, URLs, countries, quantities, and sensitive values from text.","maintainers":[{"name":"claudiu.ceia","email":"claudiu.ceia@gmail.com"}],"readme":"<p align=\"center\">\n  <img\n    src=\"https://raw.githubusercontent.com/ClaudiuCeia/ts-duckling/main/logo.png\"\n    width=\"200\"\n    alt=\"ts-duckling logo\"\n  />\n</p>\n\n# ts-duckling\n\nExtract typed entities from text in TypeScript.\n\nFind dates, times, URLs, countries, quantities, institutions, languages, and\nsensitive values in free-form text. Each result includes a typed value and its\nsource span. Everything runs locally, with no model or network request.\n\n<p>\n  <a href=\"https://github.com/ClaudiuCeia/ts-duckling/actions/workflows/ci.yml\"><img src=\"https://github.com/ClaudiuCeia/ts-duckling/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"></a>\n  <a href=\"https://jsr.io/@claudiu-ceia/ts-duckling\"><img src=\"https://jsr.io/badges/@claudiu-ceia/ts-duckling\" alt=\"JSR\"></a>\n  <a href=\"https://www.npmjs.com/package/@claudiu-ceia/ts-duckling\"><img src=\"https://img.shields.io/npm/v/@claudiu-ceia/ts-duckling\" alt=\"npm\"></a>\n  <a href=\"./LICENSE\"><img src=\"https://img.shields.io/github/license/ClaudiuCeia/ts-duckling\" alt=\"MIT license\"></a>\n</p>\n\n```ts\nimport { Duckling, Email, Time, URL } from \"@claudiu-ceia/ts-duckling\";\n\nconst duckling = Duckling([Time.parser, URL.parser, Email.parser]);\n\nconst entities = duckling.extract(\n  \"The review is on May 18, 2024. Notes are at https://example.com/brief and contact alex@company.io\",\n);\n\nfor (const entity of entities) {\n  console.log(\n    entity.kind,\n    `[${entity.start}, ${entity.end})`,\n    entity.text,\n    JSON.stringify(entity.value),\n  );\n}\n```\n\nOutput:\n\n```text\ntime [17, 29) May 18, 2024 {\"when\":{\"type\":\"date\",\"year\":2024,\"month\":5,\"day\":18},\"grain\":\"day\",\"era\":\"CE\"}\nurl [44, 69) https://example.com/brief {\"url\":\"https://example.com/brief\"}\nemail [82, 97) alex@company.io {\"email\":\"alex@company.io\"}\n```\n\nPassing an explicit parser list controls what Duckling looks for and narrows\nthe result type to those entity kinds.\n\nThe example and output are checked in\n[`examples/readme.test.ts`](./examples/readme.test.ts).\n\n## Playground\n\nTry the [live entity extraction playground](https://claudiuceia.github.io/ts-duckling/)\nin your browser.\n\n## Installation\n\n```sh\nbun add @claudiu-ceia/ts-duckling\n```\n\n```sh\nnpm install @claudiu-ceia/ts-duckling\n```\n\n```sh\npnpm add @claudiu-ceia/ts-duckling\n```\n\n```sh\ndeno add jsr:@claudiu-ceia/ts-duckling\n```\n\nImport the npm package in Bun or Node:\n\n```ts\nimport { Duckling } from \"@claudiu-ceia/ts-duckling\";\n```\n\nImport the JSR package in Deno:\n\n```ts\nimport { Duckling } from \"jsr:@claudiu-ceia/ts-duckling\";\n```\n\n## Supported entities\n\n### General text entities\n\n| Export        | `kind`        | Example                             | Scope or validation                                                                                    |\n| ------------- | ------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------ |\n| `Time`        | `time`        | `May 18, 2024`, `next Friday`       | English-focused dates, times, weekdays, and relative expressions. Invalid calendar dates are rejected. |\n| `Range`       | `range`       | `between 10 and 12 degrees Celsius` | Time, era-qualified year, and temperature ranges.                                                      |\n| `Temperature` | `temperature` | `90F`, `20 Celsius`                 | Celsius, Fahrenheit, and some unitless degree expressions. A bare `1 degree` is rejected.              |\n| `Quantity`    | `quantity`    | `100,000.24`, `2 million`           | Numeric quantities and English compact multipliers. It does not assign physical or currency units.     |\n| `Location`    | `location`    | `Germany`, `Türkiye`                | Countries only. It does not recognize cities, landmarks, or addresses.                                 |\n| `URL`         | `url`         | `https://example.com/brief`         | HTTP, HTTPS, FTP, FTPS, and bare domains. Bare domains require a listed active TLD.                    |\n| `Institution` | `institution` | `King's College London`             | Capitalization-based names for universities, colleges, schools, city halls, and town halls.            |\n| `Language`    | `language`    | `Mandarin Chinese`                  | English CLDR names, aliases, and compatibility names with canonical language codes.                    |\n\n### Sensitive values and identifiers\n\n| Export          | `kind`           | Example                                       | Scope or validation                                                                                |\n| --------------- | ---------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------- |\n| `Email`         | `email`          | `no-reply+foo@some.domain.dev`                | Validates syntax, boundaries, and length limits. It does not check deliverability.                 |\n| `Phone`         | `phone`          | `+1 (415) 555-2671`                           | Structural E.164-shaped international and 10-digit NANP forms. It does not query numbering plans.  |\n| `IPAddress`     | `ip`             | `192.168.1.1`, `2001:db8::1`                  | Validates IPv4 octets and full or compressed hexadecimal IPv6.                                     |\n| `SSN`           | `ssn`            | `123-45-6789`                                 | Hyphenated US format with basic area, group, and serial constraints. Validation is not exhaustive. |\n| `CreditCard`    | `credit_card`    | `4242 4242 4242 4242`                         | Requires 13 to 19 digits and a valid Luhn checksum. It does not validate the issuer.               |\n| `UUID`          | `uuid`           | `550e8400-e29b-41d4-a716-446655440000`        | Canonical hexadecimal shape. Version and variant bits are not constrained.                         |\n| `ApiKey`        | `api_key`        | `sk_live_` followed by a provider key body    | Recognized provider prefixes only. Generic unprefixed keys are not matched.                        |\n| `IBAN`          | `iban`           | `GB29 NWBK 6016 1331 9268 19`                 | Checks supported country length and the Mod 97 checksum.                                           |\n| `MACAddress`    | `mac_address`    | `00:1A:2B:3C:4D:5E`                           | Six-octet colon or hyphen forms and Cisco dot notation. It does not validate the OUI.              |\n| `JWT`           | `jwt`            | `eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIn0.abc123` | Checks three base64url-shaped segments and a JSON object header. It does not verify signatures.    |\n| `CryptoAddress` | `crypto_address` | `1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2`          | Checksum-validates supported Bitcoin forms and validates Ethereum address casing rules.            |\n| `BIC`           | `bic`            | `DEUTDEFF`, `BOFAUS3NXXX`                     | Checks uppercase ISO 9362 shape and a known country code. It does not query a bank registry.       |\n\n## Selecting parsers and typed results\n\nParser selection controls recognition scope and TypeScript inference:\n\n```ts\nimport { Duckling, Time, URL } from \"@claudiu-ceia/ts-duckling\";\n\nconst duckling = Duckling([Time.parser, URL.parser]);\nconst entities = duckling.extract(\"Review May 18, 2024 at https://example.com\");\n// entities: (TimeEntity | URLEntity)[]\n```\n\nCall `Duckling()` with no arguments to explore all 20 built-in parser\ncategories. Most applications should select only the categories they need to\nreduce false positives.\n\n`extractAsync(text, options)` scans one complete string and periodically yields\nto the event loop. It supports cancellation through `AbortSignal`. It is\ncooperative asynchronous scanning. It does not consume a stream of chunks.\n\n## Rendering extracted spans\n\nUse `renderMap()` to turn extracted spans into React or JSX values while\npreserving unmatched text:\n\n```tsx\nimport type { JSX } from \"react\";\nimport { Duckling, Time, URL } from \"@claudiu-ceia/ts-duckling\";\n\nconst text = \"Review May 18, 2024 at https://example.com\";\nconst parts = Duckling([Time.parser, URL.parser]).renderMap<JSX.Element>(\n  text,\n  ({ entity, children }) => (\n    <mark key={entity.start} data-kind={entity.kind}>\n      {children}\n    </mark>\n  ),\n);\n```\n\n`render()` performs string replacement through the same extracted spans. A\ncallback receives the entity and the already-rendered text for its span.\n\n> `render()` does not sanitize HTML, attributes, or URLs. Escape and validate\n> values before inserting its output into a document.\n\n## PII and sensitive values\n\n`PIIParsers` detects configured sensitive formats and `.redact()` provides\nbasic span replacement. Use\n[`@claudiu-ceia/pii-mask`](https://github.com/ClaudiuCeia/pii-mask) for nested\nobject traversal, reusable masking policies, and Pino or Winston integration.\n\n```ts\nimport { Duckling, PIIParsers } from \"@claudiu-ceia/ts-duckling\";\n\nconst scrubbed = Duckling(PIIParsers).redact(\"Email alex@company.io\");\n// \"Email ███████████████\"\n```\n\nDetection is rule-based and can produce false positives and false negatives.\nIt is not a compliance boundary and should not replace known-field redaction.\n\nThe preset includes email addresses, phone numbers, IP addresses, SSNs, credit\ncard numbers, UUIDs, API keys, IBANs, MAC addresses, JWTs, cryptocurrency\naddresses, and BIC/SWIFT identifiers. Some of these are credentials or\nidentifiers rather than universally defined PII.\n\n## Custom entities\n\nAny combine parser that returns an `Entity` can be used alongside the built-in\nparsers.\n\nCustom entity definitions use combine directly, so add it as an application\ndependency:\n\n```sh\nbun add @claudiu-ceia/combine\n```\n\n```ts\nimport { defineLanguage, map, regex } from \"@claudiu-ceia/combine\";\nimport { Duckling, ent, type Entity } from \"@claudiu-ceia/ts-duckling\";\n\ntype HashtagEntity = Entity<\"hashtag\", { tag: string }>;\n\nconst Hashtag = defineLanguage<{\n  Full: HashtagEntity;\n  parser: HashtagEntity;\n}>({\n  Full: () =>\n    map(regex(/#[A-Za-z0-9_]{2,64}/, \"hashtag\"), (match, before, after) =>\n      ent({ tag: match.slice(1) }, \"hashtag\", before, after),\n    ),\n  parser: (symbol) => symbol.Full,\n});\n\nconst entities = Duckling([Hashtag.parser]).extract(\"Ship #duckling\");\n```\n\nSee [combine](https://github.com/ClaudiuCeia/combine) for grammar construction.\n\n## Scope and accuracy\n\n- Recognition is rule-based.\n- Temporal vocabulary and supporting data are English-focused.\n- `Location` currently recognizes countries only.\n- Yearless and relative dates depend on the current UTC date.\n- Ambiguous text can produce false positives. For example, `6/2022` can be read as a date.\n- Entity validation varies by parser. The tables above summarize important checks.\n- Duckling does not perform open-domain named entity recognition.\n- PII and credential detection cannot guarantee that sensitive text is absent.\n\nUse a narrow parser list and test against representative input. Do not enable\nentity categories that the application does not need.\n\n## Relationship to Duckling\n\nts-duckling was inspired by Meta's Duckling, but it is not a TypeScript port.\nIt has its own API, grammars, supported entity set, and language scope.\n\n## Runtime support\n\nThe published package is runtime-neutral TypeScript and ESM.\n\nBun is the primary development toolchain. npm packages are tested on Bun and\nsupported Node versions. The same source is published to JSR and checked with\nDeno. The playground bundles the package for the browser and is built in CI.\n\nCI pins Bun 1.4.0, tests Node 22, 24, and 26, and checks the JSR source with Deno\n2.x.\n\nThe playground is part of the Bun workspace. Its source remains under `docs/`\nbecause GitHub Pages publishes that directory.\n\n## Benchmarks\n\nBenchmark sources in [`bench/`](./bench/) cover mixed text, sensitive values,\nno-match text, parser selection, and cooperative async scanning. They are\nregression checks rather than published performance claims.\n\nRun them with `bun run bench`. Record the Bun version, machine or CI runner,\ninput size, selected parsers, match count, sample count, and reported statistic\nwhen publishing results.\n\n## API documentation\n\nThe main methods are:\n\n```text\nDuckling(parsers?)\nextract(text)\nextractAsync(text, options?)\nrender(text, callback)\nrenderMap(text, callback)\nredact(text, options?)\n```\n\nAsync variants of `render()` and `renderMap()` are also available. See the\n[generated JSR API reference](https://jsr.io/@claudiu-ceia/ts-duckling/doc) for\ntypes, callback signatures, entity value shapes, and experimental API details.\n\n## Development\n\nInstall dependencies and run the repository checks with Bun:\n\n```sh\nbun install\nbun run check\nbun run package:check\nbun run bench\n```\n\nRun the playground with `bun run docs:dev` and build it with\n`bun run docs:build`.\n\nDeno remains part of compatibility and JSR validation:\n\n```sh\nDENO_NO_PACKAGE_JSON=1 deno check --frozen mod.ts\nDENO_NO_PACKAGE_JSON=1 deno publish --dry-run --frozen\n```\n\n## License\n\nMIT © [Claudiu Ceia](https://github.com/ClaudiuCeia)\n","readmeFilename":"README.md"}