Socket
Book a DemoInstallSign in
Socket

anonymise

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anonymise

Sample typescript module template for node and native browser

latest
npmnpm
Version
1.0.10
Version published
Maintainers
1
Created
Source

String anonymisation library

This module anonymises string with provided blank character

Table of contents

  • General info
  • Documentation
  • Contact

General info

Paytip Tickler Module Developer documentation

Documentation

Initialise

Node Typescript

import fromString, {Result} from 'anonymise'
// from now on you may invoke module calls

Node Javascript

const anonymise = require('anonymise');
// from now on you may invoke module calls

Browser

<!-- in HEAD section -->
<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);
});
KindParameterTypeDescription
IninputstringString that will be anonymised. String length will not be changed.
InsymbolstringSingle character that will be used for anonymisation, aka. the blank
InhowManynumberHow many chars to anonymise using blank symbol. Optional. When not provided half the input will be used.
InkeystringExternal record key. When not provided random string of length 16 will be generated. May be used for reference to the original record
OutObject
OutkstringRecord key. External or randomly generated
OutvstringAnonymised string - the result of anonymisation
OutostringOriginal input string

Contact

Created by maciej.grula@execon.pl

Keywords

sample

FAQs

Package last updated on 16 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.