Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Feb 8, 2019
1 parent d58bd06 commit c5c1659
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/Array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function compact<T>(array: MaybeNull<T>[]): T[] {
return array.filter(elem => elem != null) as T[]
}

export function times<T>(n: number, f: ((idx: number) => T)): T[] {
export function times<T>(n: number, f: (idx: number) => T): T[] {
return Array(n)
.fill(undefined)
.map((_, i) => f(i))
Expand Down
5 changes: 2 additions & 3 deletions src/ExifDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ export class ExifDate {
static fromEXIF(text: string): Maybe<ExifDate> {
if (blank(text)) return
text = toS(text).trim()
return first(
["y:MM:dd", "y-MM-dd", "y:M:d", "MMM d y", "MMMM d y"],
fmt => map(DateTime.fromFormat(text, fmt), dt => this.fromDateTime(dt))
return first(["y:MM:dd", "y-MM-dd", "y:M:d", "MMM d y", "MMMM d y"], fmt =>
map(DateTime.fromFormat(text, fmt), dt => this.fromDateTime(dt))
)
}

Expand Down
6 changes: 5 additions & 1 deletion src/ReadTask.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ describe("Lat/Lon parsing", () => {
})
it("parses lat lon even if timezone is given", () => {
expect(
parse({ GPSLongitude: 122.4406148, GPSLongitudeRef: "W", OffsetTime: "+02:00" }).GPSLongitude
parse({
GPSLongitude: 122.4406148,
GPSLongitudeRef: "W",
OffsetTime: "+02:00"
}).GPSLongitude
).to.be.closeTo(-122.4406148, 0.00001)
})
})
Expand Down
46 changes: 23 additions & 23 deletions src/Tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5106,29 +5106,29 @@ export interface APP0Tags {
OcadRevision?: number
}

export interface Tags extends
EXIFTags,
ExifToolTags,
FileTags,
MakerNotesTags,
CompositeTags,
PrintIMTags,
JFIFTags,
APP12Tags,
XMPTags,
PhotoshopTags,
FlashPixTags,
ICC_ProfileTags,
IPTCTags,
MPFTags,
APP1Tags,
MetaTags,
QuickTimeTags,
RIFFTags,
APP14Tags,
RAFTags,
PanasonicRawTags,
APP0Tags {
export interface Tags
extends EXIFTags,
ExifToolTags,
FileTags,
MakerNotesTags,
CompositeTags,
PrintIMTags,
JFIFTags,
APP12Tags,
XMPTags,
PhotoshopTags,
FlashPixTags,
ICC_ProfileTags,
IPTCTags,
MPFTags,
APP1Tags,
MetaTags,
QuickTimeTags,
RIFFTags,
APP14Tags,
RAFTags,
PanasonicRawTags,
APP0Tags {
errors?: string[]
Error?: string
Warning?: string
Expand Down
3 changes: 1 addition & 2 deletions src/update/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function tarxzf(targzFile: string, destDir: string): Promise<void> {

export async function editPackageJson(
packageJson: string,
f: ((packageObj: any) => void)
f: (packageObj: any) => void
): Promise<void> {
const pkg = JSON.parse(await readFile(packageJson))
f(pkg)
Expand All @@ -161,7 +161,6 @@ export function updatePackageVersion(
return editPackageJson(packageJson, pkg => (pkg.version = version))
}


export function mkdir(
path: string,
ignoreErrors: boolean = false
Expand Down

0 comments on commit c5c1659

Please sign in to comment.