mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Remove semicolons.
This commit is contained in:
14
uniqueId.js
14
uniqueId.js
@@ -1,7 +1,7 @@
|
||||
import toString from './toString.js';
|
||||
import toString from './toString.js'
|
||||
|
||||
/** Used to generate unique IDs. */
|
||||
let idCounter = 0;
|
||||
let idCounter = 0
|
||||
|
||||
/**
|
||||
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
|
||||
@@ -13,15 +13,15 @@ let idCounter = 0;
|
||||
* @see random
|
||||
* @example
|
||||
*
|
||||
* uniqueId('contact_');
|
||||
* uniqueId('contact_')
|
||||
* // => 'contact_104'
|
||||
*
|
||||
* uniqueId();
|
||||
* uniqueId()
|
||||
* // => '105'
|
||||
*/
|
||||
function uniqueId(prefix) {
|
||||
const id = ++idCounter;
|
||||
return toString(prefix) + id;
|
||||
const id = ++idCounter
|
||||
return toString(prefix) + id
|
||||
}
|
||||
|
||||
export default uniqueId;
|
||||
export default uniqueId
|
||||
|
||||
Reference in New Issue
Block a user