1.0.6 • Published 5 years ago

slk-generator v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Statistical Linkage Key

Meteor Definition

Build Status

This small library handles both the generation and validation of an SLK. The library itself exposes two functions:

  • generate
  • is_valid

SLK.generate

The generate function takes 4 arguments:

  • First Name (Full)
  • Last Name (Full)
  • Date of Birth (Given in YYYY-MM-DD format)
  • Gender Identifier given as an integer from the following
GenderIdentifier
Male1
Female2
Intersex or Indeterminate3
Not stated/inadequately described9

SLK.is_valid

This function will validate a given string based off of three separate 'types'

  1. A 14 character SLK in the METeOR spec, with the date of birth validated as a true date.
  2. A 32 character Crockford encoded string, using a subset of characters to represent a 14 character SLK
  3. A 40 character hex encoded string

The return value of the is_valid function is an object with key value pairings of passed and failed validations.

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago