UUID.sys.mjs (484B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 /** 6 * Creates a unique UUID without enclosing curly brackets 7 * Example: '86c832d2-cf1c-4001-b3e0-8628fdd41b29' 8 * 9 * @returns {string} 10 * The generated UUID as a string. 11 */ 12 export function generateUUID() { 13 return Services.uuid.generateUUID().toString().slice(1, -1); 14 }