Skip to content

index-ts/sequence-shorten

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sequence Shorten

Shorten your sequence number or hash key.

Install

npm i sequence-shorten

Usage

If u want to encode ur sequence number or hash key.

import SequenceShorten from './sequence-shorten';
const sequenceNumber = 19950824;


// Result: bvShE
new SequenceShorten.encode(sequenceNumber);

Or want to decode like below.

import SequenceShorten from './sequence-shorten';
const sequenceNumber = 19950824;
const encodedNumber = new SequenceShorten.encode(sequenceNumber);

// Result: 19950824
new SequenceShorten.decode(encodedNumber);

Comment

  • There must be no x1, x2 (with x1 ≠ x2) that will make f(x1) = f(x2),
  • and for every y you must be able to find an x so that f(x) = y.

About

Shorten your sequence number or hash key

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%