sequence-shorten
Shorten your sequence number or hash key
Last updated a year ago by hax0r .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sequence-shorten 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.3                                ...           latest (a year ago)

4 Versions

  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 4
Dependencies (6)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |