1 var toString = require('./toString');
3 /** Used to generate unique IDs. */
7 * Generates a unique ID. If `prefix` is given, the ID is appended to it.
13 * @param {string} [prefix=''] The value to prefix the ID with.
14 * @returns {string} Returns the unique ID.
17 * _.uniqueId('contact_');
23 function uniqueId(prefix) {
25 return toString(prefix) + id;
28 module.exports = uniqueId;