redact-pii
Version:
Remove personally identifiable information from text.
12 lines (9 loc) • 501 B
text/typescript
import { SimpleRegexpCustomRedactorConfig, AsyncCustomRedactorConfig, ISyncRedactor, IRedactor } from './types';
export function isSimpleRegexpCustomRedactorConfig(
redactor: AsyncCustomRedactorConfig
): redactor is SimpleRegexpCustomRedactorConfig {
return typeof (redactor as SimpleRegexpCustomRedactorConfig).regexpPattern !== 'undefined';
}
export function isSyncRedactor(redactor: IRedactor): redactor is ISyncRedactor {
return typeof (redactor as ISyncRedactor).redact === 'function';
}