Anonymizer

Replaces the account name, host name and home directory of the machine that made a value.

Properties

Link copied to clipboard
const val HOME: String
Link copied to clipboard
const val HOST: String
Link copied to clipboard
const val USER: String

Functions

Link copied to clipboard
fun anonymize(value: String, owners: Map<String, String>, home: String? = null): String

Other users' home paths become .../user; names equal to an owner become its placeholder; with home, that exact directory becomes ~ first.

Link copied to clipboard
fun home(attrs: Map<String, String>): String?

The directory in env.HOME, or null when it is missing or the root.

Link copied to clipboard

Names to replace, from the env.* values in attrs; names under 3 characters stay.