Skip to content

Commit

Permalink
comment out broken console log
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Jul 11, 2021
1 parent 036dbb8 commit 0021a0c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "breadcrumbs",
"name": "Breadcrumbs",
"version": "0.8.8",
"version": "0.8.9",
"minAppVersion": "0.12.7",
"description": "Visualise the hierarchy of your vault using a breadcrumb trail or matrix view",
"author": "SkepticMystic",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "breadcrumbs-plugin",
"version": "0.8.8",
"version": "0.8.9",
"description": "Visualise the hierarchy of your vault using a breadcrumb trail",
"main": "main.js",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions src/sharedFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ export function normalise(arr: number[]): number[] {
return arr.map(item => item / max)
}

export function flatten(arr: any[]): any[] {
return [].concat.apply([], arr)
export function flatten<T>(arr: T[]): T[] {
return [].concat(...arr)
}

export const isSubset = (arr1: any[], arr2: any[]): boolean => arr1.every(value => arr2.includes(value));
export const isSubset = <T>(arr1: T[], arr2: T[]): boolean => arr1.every(value => arr2.includes(value));

export function getFileFrontmatterArr(
app: App,
Expand Down Expand Up @@ -141,7 +141,7 @@ export function getFields(
}
else {
superDebug(settings, `${field} (type: '${typeof fieldItems}') of: ${fileFrontmatter.file.basename} is:`)
superDebug(settings, (fieldItems?.join(', ') ?? undefined))
// superDebug(settings, (fieldItems?.join(', ') ?? undefined))


const flattenedItems: string[] = flatten(flatten(fieldItems)) as string[];
Expand Down Expand Up @@ -225,13 +225,13 @@ export async function getNeighbourObjArr(
return neighbourObjArr;
}

export function debug(settings: BreadcrumbsSettings, log: any): void {
export function debug(settings: BreadcrumbsSettings, log: never): void {
if (settings.debugMode) {
console.log(log)
}
}

export function superDebug(settings: BreadcrumbsSettings, log: any): void {
export function superDebug(settings: BreadcrumbsSettings, log: never): void {
if (settings.superDebugMode) {
console.log(log)
}
Expand Down
1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"0.8.9": "0.12.9",
"0.8.8": "0.12.9",
"0.8.7": "0.12.9",
"0.8.6": "0.12.8",
Expand Down

0 comments on commit 0021a0c

Please sign in to comment.