Home

Awesome

think-hashids

npm Build Status Coverage Status

Generate a short unique ID from the integer for ThinkJS base on hashids

How to use

Install

npm install think-hashids --save

Configure extends.js

const hashids = require('think-hashids')

module.exports = [
  hashids({
    salt: 'this is salt',
    minLength: 10,
    alphabet: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
  })
];

Config

Method