Comparing version 1.0.1 to 1.0.2
@@ -0,1 +1,6 @@ | ||
<a name="1.0.2"></a> | ||
## [1.0.2](https://github.com/mjancarik/easy-uid/compare/1.0.1...1.0.2) (2020-04-28) | ||
<a name="1.0.1"></a> | ||
@@ -2,0 +7,0 @@ ## [1.0.1](https://github.com/mjancarik/easy-uid/compare/1.0.0...1.0.1) (2018-09-11) |
function easyUId(a, b) { | ||
for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ Math.random() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-'); | ||
return `${new Date().getTime().toString(36)}-${b}`; | ||
return new Date().getTime().toString(36) + '-' + b; | ||
} | ||
export default easyUId; |
@@ -6,5 +6,5 @@ 'use strict'; | ||
return `${new Date().getTime().toString(36)}-${b}`; | ||
return new Date().getTime().toString(36) + '-' + b; | ||
} | ||
module.exports = easyUId; |
{ | ||
"name": "easy-uid", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Easy unique id generator for node and browser.", | ||
@@ -5,0 +5,0 @@ "main": "lib/easy-uid.js", |
@@ -5,3 +5,3 @@ # easy-uid | ||
[![Coverage Status](https://coveralls.io/repos/github/mjancarik/easy-uid/badge.svg?branch=master)](https://coveralls.io/github/mjancarik/easy-uid?branch=master) | ||
![GitHub package version](https://img.shields.io/github/package-json/v/mjancarik/easy-uid.svg) | ||
[![NPM package version](https://img.shields.io/npm/v/easy-uid/latest.svg)](https://www.npmjs.com/package/easy-uid) | ||
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) | ||
@@ -8,0 +8,0 @@ |
5408