mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-07 14:09:03 +00:00
fix typos, rename notion.add to notion.create
This commit is contained in:
parent
9bb779149b
commit
fd2b729228
@ -86,12 +86,12 @@ export const slugger = (heading, slugs = new Set()) => {
|
|||||||
* (from https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid)
|
* (from https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid)
|
||||||
* @returns {string} a uuidv4
|
* @returns {string} a uuidv4
|
||||||
*/
|
*/
|
||||||
export const uuidv4 = () =>
|
export const uuidv4 = () => {
|
||||||
crypto?.randomUUID
|
if (crypto?.randomUUID) return crypto.randomUUID();
|
||||||
? crypto.randomUUID()
|
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>
|
||||||
: ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>
|
|
||||||
(c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)
|
(c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const patterns = {
|
const patterns = {
|
||||||
alphanumeric: /^[\w\.-]+$/,
|
alphanumeric: /^[\w\.-]+$/,
|
||||||
|
Loading…
Reference in New Issue
Block a user