1.0.6 • Published 5 years ago

id-encode v1.0.6

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

Usage

the coding is good for index encode from integer to alphanumeric and reduce character size to use in shorturl link

check digit is for you to validate the input first

const coding = require('id-encode')(key,checkdigitsize)

key is a random string created by you , e.g "ewrfsfsfer"

checkdigitsize is length of the check digit

encode

coding.encode(100000)

decode

coding.decode('R4erer') if the decode is invalid , an empty string will be returned

here is the example f8tuE 1000000 36kOR 1000001 86xPk 1000002 76ve3 1000003 06d12 1000004 d8oi9 1000005 76ve6 1000006 c8lGT 1000007 e8qTu 1000008 26idH 1000009 56q1A 1000010 e8qTx 1000011 26idK 1000012 e8qTz 1000013 16fCu 1000014 56q1F 1000015 86xPy 1000016 76veh 1000017 06d1g 1000018 36kP9 1000019 46nqs 1000020 76vel 1000021 c8lH8 1000022 56q1N 1000023 a8guA 1000024 b8j5T 1000025 36kPg 1000026 26idZ 1000027 96Ar2 1000028 26ie1 1000029 86xPM 1000030 36kPl 1000031 d8oiA 1000032 66sDf 1000033 96Ar8 1000034 96Ar9 1000035 16fCQ 1000036 76veB 1000037 c8lHo 1000038 76veD 1000039 b8j68 1000040 46nqN 1000041 a8guS 1000042 96Arh 1000043 36kPy 1000044 56q29 1000045 96Ark 1000046 46nqT 1000047 f8tvq 1000048 e8qU9 1000049 66sDw 1000050 a8gv1 1000051 c8lHC 1000052 46nqZ 1000053 a8gv4 1000054 d8oiX 1000055 46nr2 1000056 f8tvz 1000057 26ieu 1000058 56q2n 1000059 66sDG 1000060 e8qUl 1000061 26iey 1000062 06d1Z 1000063 c8lHO 1000064 76vf3 1000065 b8j6y 1000066 66sDN 1000067 16fDm 1000068 46nrf 1000069 e8qUu 1000070 f8tvN 1000071 b8j6E 1000072 66sDT 1000073 06d2a 1000074 66sDV 1000075 46nrm 1000076 c8lI1 1000077 56q2G 1000078 46nrp 1000079 b8j6M 1000080 46nrr 1000081 86xQC 1000082 a8gvx 1000083 46nru 1000084 36kQd 1000085 36kQe 1000086 66sE7 1000087 f8tw4 1000088 a8gvD 1000089 56q2S 1000090 36kQj 1000091 26if2 1000092 96As5 1000093 76vfw 1000094 46nrF 1000095 36kQo 1000096 66sEh 1000097 46nrI 1000098 06d2z 1000099

1.0.6

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago