fe-drone-ci/src/utils/createUniqueString.js

9 lines
242 B
JavaScript
Raw Normal View History

2017-04-18 07:09:13 +00:00
/**
* Created by jiachenpan on 17/3/8.
*/
export default function createUniqueString() {
2017-08-22 07:43:34 +00:00
const timestamp = +new Date() + ''
const randomNum = parseInt((1 + Math.random()) * 65536) + ''
return (+(randomNum + timestamp)).toString(32)
2017-04-18 07:09:13 +00:00
}