Nutritious Pancake Mountain

    sequence-shorten
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.3 • Public • Published

    Sequence Shorten

    Shorten your sequence number or hash key.

    Build Status

    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.

    Install

    npm i sequence-shorten

    DownloadsWeekly Downloads

    61

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    11 kB

    Total Files

    12

    Last publish

    Collaborators

    • hax0r