UNPKG

wett

Version:

wett is a api layer between user api and db. provinding inbuilt user authentication via jwt and a db layer module to easily use multiple db with common functions

22 lines (15 loc) 352 B
"use strict"; const uniqid = require('uniqid'); const md5 = require('md5'); const shortid = require('shortid'); module.exports = { hash : function(string){ return md5(string.toString()); }, random : function(string){ return md5(uniqid()); }, short : function(string){ return shortid.generate(); }, };