mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-07 05:59:02 +00:00
fix typos, rename notion.add to notion.create
This commit is contained in:
parent
9bb779149b
commit
fd2b729228
@ -28,7 +28,7 @@ export { feather } from './feather.mjs';
|
||||
|
||||
/**
|
||||
* adds a view to the enhancer's side panel
|
||||
* @param {object} panel- information used to construct and render the panel
|
||||
* @param {object} panel - information used to construct and render the panel
|
||||
* @param {string} panel.id - a uuid, used to restore the last open view on reload
|
||||
* @param {string} panel.icon - an svg string
|
||||
* @param {string} panel.title - the name of the view
|
||||
|
@ -222,7 +222,7 @@ web.loadStylesheet('api/components/panel.css');
|
||||
|
||||
/**
|
||||
* adds a view to the enhancer's side panel
|
||||
* @param {object} panel- information used to construct and render the panel
|
||||
* @param {object} panel - information used to construct and render the panel
|
||||
* @param {string} panel.id - a uuid, used to restore the last open view on reload
|
||||
* @param {string} panel.icon - an svg string
|
||||
* @param {string} panel.title - the name of the view
|
||||
|
@ -86,12 +86,12 @@ export const slugger = (heading, slugs = new Set()) => {
|
||||
* (from https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid)
|
||||
* @returns {string} a uuidv4
|
||||
*/
|
||||
export const uuidv4 = () =>
|
||||
crypto?.randomUUID
|
||||
? crypto.randomUUID()
|
||||
: ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>
|
||||
export const uuidv4 = () => {
|
||||
if (crypto?.randomUUID) return crypto.randomUUID();
|
||||
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>
|
||||
(c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)
|
||||
);
|
||||
};
|
||||
|
||||
const patterns = {
|
||||
alphanumeric: /^[\w\.-]+$/,
|
||||
|
Loading…
Reference in New Issue
Block a user