Skip to content

Commit

Permalink
chore(format): Apply prettier 2.0 formatting
Browse files Browse the repository at this point in the history
- Adds final commas.
- Always adds function args brackets.
  • Loading branch information
Daniel Bradley committed May 7, 2020
1 parent 06a108d commit 81989ea
Show file tree
Hide file tree
Showing 8 changed files with 854 additions and 390 deletions.
6 changes: 3 additions & 3 deletions src/arrays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ export function init<T>(
return {
start: 0,
count: options,
increment: 1
increment: 1,
}
}
if ('from' in options) {
Expand All @@ -631,14 +631,14 @@ export function init<T>(
return {
start: options.from,
count: Math.floor((options.to - options.from) / increment + 1),
increment: increment
increment: increment,
}
}
const start = options.start === undefined ? 0 : options.start
return {
start,
count: options.count,
increment: options.increment === undefined ? 1 : options.increment
increment: options.increment === undefined ? 1 : options.increment,
}
}
const { start, count, increment } = normaliseOptions()
Expand Down
6 changes: 3 additions & 3 deletions src/iterables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ export function* init(options: number | InitRange | InitCount): Iterable<number>
return {
start: 0,
count: options,
increment: 1
increment: 1,
}
}
if ('from' in options) {
Expand All @@ -425,14 +425,14 @@ export function* init(options: number | InitRange | InitCount): Iterable<number>
return {
start: options.from,
count: Math.floor((options.to - options.from) / increment + 1),
increment: increment
increment: increment,
}
}
const start = options.start === undefined ? 0 : options.start
return {
start,
count: options.count,
increment: options.increment === undefined ? 1 : options.increment
increment: options.increment === undefined ? 1 : options.increment,
}
}
const { start, count, increment } = normaliseOptions()
Expand Down
2 changes: 1 addition & 1 deletion src/maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function filter<Key, T>(a: any, b?: any): any {
const predicate: (key: Key, value: T) => boolean = partial ? a : b
function exec(source: ReadonlyMap<Key, T>) {
return new Map<Key, T>(
Iterables.filter(source.entries(), entry => predicate(entry[0], entry[1]))
Iterables.filter(source.entries(), (entry) => predicate(entry[0], entry[1]))
)
}
return partial ? exec : exec(a)
Expand Down
Loading

0 comments on commit 81989ea

Please sign in to comment.