Skip to content

Commit

Permalink
[4.x] Add global uniqid function for generating unique IDs (#8571)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksleight committed Aug 11, 2023
1 parent eb8b0e1 commit c3e51b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/js/bootstrap/globals.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { marked } from 'marked';
import { translate, translateChoice } from '../translations/translator';
import uid from 'uniqid';

export function cp_url(url) {
url = Statamic.$config.get('cpUrl') + '/' + url;
Expand Down Expand Up @@ -84,3 +85,7 @@ export function utf8btoa(stringToEncode) {
// return base64 encoded string
return btoa(utf8String);
}

export function uniqid() {
return uid();
}

0 comments on commit c3e51b6

Please sign in to comment.