String anonymisation library
This module anonymises string with provided blank character
Table of contents
General info
Paytip Tickler Module Developer documentation
Documentation
Initialise
Node Typescript
import fromString, {Result} from 'anonymise'
Node Javascript
const anonymise = require('anonymise');
Browser
<script src="https://cdn.jsdelivr.net/npm/anonymise"></script>
fromString(input, symbol, howMany, key)
Generates json object that holds anonymised input string
Node Typescript
const result:Result = fromString('hello world','*',3);
});
Node Javascript
var anonymiseResult = anonymise.fromString('hello world','*',3);
});
Browser
var anonymiseResult = anonymise.fromString('hello world','*',3);
});
In | input | string | String that will be anonymised. String length will not be changed. |
In | symbol | string | Single character that will be used for anonymisation, aka. the blank |
In | howMany | number | How many chars to anonymise using blank symbol. Optional. When not provided half the input will be used. |
In | key | string | External record key. When not provided random string of length 16 will be generated. May be used for reference to the original record |
Out | | Object | |
Out | k | string | Record key. External or randomly generated |
Out | v | string | Anonymised string - the result of anonymisation |
Out | o | string | Original input string |
Contact
Created by maciej.grula@execon.pl