Merge chore/move-to-mobiletic-labs into main
Migrate git org refs + npm scope to mobiletic-labs.
This commit is contained in:
16
README.md
16
README.md
@@ -1,7 +1,7 @@
|
||||
# @mobiletic/anonymizer
|
||||
# @mobiletic-labs/anonymizer
|
||||
|
||||
[](https://git.mobiletic.net/mobiletic/anonymizer/actions)
|
||||
[](https://www.npmjs.com/package/@mobiletic/anonymizer)
|
||||
[](https://git.mobiletic.net/mobiletic-labs/anonymizer/actions)
|
||||
[](https://www.npmjs.com/package/@mobiletic-labs/anonymizer)
|
||||
[](./LICENSE)
|
||||
|
||||
Framework-agnostic **PII anonymization & pseudonymization** for TypeScript/JavaScript.
|
||||
@@ -27,7 +27,7 @@ values afterwards — including across **streamed** tokens.
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install @mobiletic/anonymizer
|
||||
npm install @mobiletic-labs/anonymizer
|
||||
```
|
||||
|
||||
Requires Node ≥ 18 (uses native `fetch`).
|
||||
@@ -37,7 +37,7 @@ Requires Node ≥ 18 (uses native `fetch`).
|
||||
### Regex-only (no LLM, fully deterministic)
|
||||
|
||||
```ts
|
||||
import { Anonymizer, presets } from '@mobiletic/anonymizer';
|
||||
import { Anonymizer, presets } from '@mobiletic-labs/anonymizer';
|
||||
|
||||
const anonymizer = new Anonymizer({ patterns: presets.swiss });
|
||||
|
||||
@@ -52,7 +52,7 @@ anonymizer.deanonymize(anon, mapping); // -> "Écris à jean@exemple.ch"
|
||||
### With an LLM (also catches names, addresses…)
|
||||
|
||||
```ts
|
||||
import { Anonymizer, openAICompatibleProvider, presets } from '@mobiletic/anonymizer';
|
||||
import { Anonymizer, openAICompatibleProvider, presets } from '@mobiletic-labs/anonymizer';
|
||||
|
||||
const anonymizer = new Anonymizer({
|
||||
llm: openAICompatibleProvider({
|
||||
@@ -187,7 +187,7 @@ keeping the regex fallback for when the LLM fails — maximum recall with gracef
|
||||
### Presets & custom patterns
|
||||
|
||||
```ts
|
||||
import { presets } from '@mobiletic/anonymizer';
|
||||
import { presets } from '@mobiletic-labs/anonymizer';
|
||||
|
||||
presets.swiss; // AVS, IBAN CH, EMAIL, Swiss phone, DATE
|
||||
presets.generic; // EMAIL, IBAN, credit card, IPv4, phone, DATE
|
||||
@@ -215,7 +215,7 @@ so arbitrary long digit runs aren't mistaken for credit cards:
|
||||
Implement `LlmProvider` to use any backend (Anthropic, a local model, a rules engine…):
|
||||
|
||||
```ts
|
||||
import type { LlmProvider } from '@mobiletic/anonymizer';
|
||||
import type { LlmProvider } from '@mobiletic-labs/anonymizer';
|
||||
|
||||
const myProvider: LlmProvider = {
|
||||
isConfigured: () => true,
|
||||
|
||||
Reference in New Issue
Block a user