1 var baseToString = require('../internal/baseToString');
3 /** Used to generate unique IDs. */
7 * Generates a unique ID. If `prefix` is provided the ID is appended to it.
12 * @param {string} [prefix] The value to prefix the ID with.
13 * @returns {string} Returns the unique ID.
16 * _.uniqueId('contact_');
22 function uniqueId(prefix) {
24 return baseToString(prefix) + id;
27 module.exports = uniqueId;