fix typos, rename notion.add to notion.create

This commit is contained in:
dragonwocky 2021-10-04 18:35:22 +11:00
parent 9bb779149b
commit fd2b729228
3 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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) =>
(c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)
);
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\.-]+$/,