Tiny style correction in uniqueId and compareMultiple

This commit is contained in:
Michał Lipiński
2018-05-15 10:53:07 +02:00
parent 0d361bc7b6
commit aff1928482
2 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/** Used to generate unique IDs. */
let idCounter = {}
const idCounter = {}
/**
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
@@ -18,12 +18,12 @@ let idCounter = {}
* // => '105'
*/
function uniqueId(prefix='$lodash$') {
if(!idCounter[prefix]){
if (!idCounter[prefix]) {
idCounter[prefix] = 0
}
const id =++idCounter[prefix]
if(prefix === '$lodash$') {
if (prefix === '$lodash$') {
return `${id}`
}