Skip to content

Commit

Permalink
style: prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Oct 20, 2023
1 parent fe20585 commit 13c8b97
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/loader/url_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export default class URLLoader extends Loader {
async load(input) {
let res;
try {
const userAgent = `BTE/${process.env.NODE_ENV === 'production' ? 'prod' : 'dev'} Node/${process.version} ${process.platform}`;
const userAgent = `BTE/${process.env.NODE_ENV === 'production' ? 'prod' : 'dev'} Node/${process.version} ${
process.platform
}`;
res = await axios.get(input, {
responseType: 'text',
headers: { 'User-Agent': userAgent },
Expand Down
2 changes: 1 addition & 1 deletion src/tree/base_tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default abstract class BaseTree implements BaseTreeObject {
this._objects_in_tree[this._modify(name1)]?.addChild(name);
// console.log(`object ${name} includes mixin ${name1}!`);
}
})
});
}
});
}
Expand Down
17 changes: 12 additions & 5 deletions src/tree/enum_tree.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import Slot from '../object/slot_object';
import { underscore } from '../utils';
import { BioLinkEnums, BioLinkQualifiersObject, BioLinkEnumTreeObject, BioLinkQualifierObject, BioLinkQualifiers, BioLinkQualifier } from '../types/types';
import {
BioLinkEnums,
BioLinkQualifiersObject,
BioLinkEnumTreeObject,
BioLinkQualifierObject,
BioLinkQualifiers,
BioLinkQualifier,
} from '../types/types';
import BaseTree from './base_tree';
import Qualifier from '../object/qualifier_object';

Expand All @@ -10,10 +17,10 @@ export default class BioLinkEnumTree extends BaseTree implements BioLinkEnumTree

constructor(objects: BioLinkEnums) {
let qualifier_objects: BioLinkQualifiers = {};
Object.values(objects).forEach(enum_value => {
Object.keys(enum_value.permissible_values ?? {}).forEach(qualifier => {
qualifier_objects[qualifier] = enum_value.permissible_values![qualifier] ?? {};
});
Object.values(objects).forEach((enum_value) => {
Object.keys(enum_value.permissible_values ?? {}).forEach((qualifier) => {
qualifier_objects[qualifier] = enum_value.permissible_values![qualifier] ?? {};
});
});
super(qualifier_objects);
this._modify = underscore;
Expand Down
2 changes: 1 addition & 1 deletion src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ export interface BioLinkEnumTreeObject extends BaseTreeObject {
getDescendants(name: string): BioLinkQualifierObject[];
getAncestors(name: string): BioLinkQualifierObject[];
getPath(downstreamNode: string, upstreamNode: string): BioLinkQualifierObject[];
}
}

0 comments on commit 13c8b97

Please sign in to comment.