Skip to content

Commit afa3590

Browse files
committed
satisfying eslint
1 parent ed7d725 commit afa3590

4 files changed

Lines changed: 32 additions & 32 deletions

File tree

src/ArrayUtilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type NonEmpty<T> = keyof T extends never ? never : T;
2323
export function non_empty_keys<
2424
T extends {[key: string]: unknown} = {[key: string]: unknown}
2525
>(
26-
object:NonEmpty<T>
26+
object:NonEmpty<T>,
2727
) : [string, ...string[]] {
2828
return Object.keys(object) as [string, ...string[]];
2929
}
@@ -43,7 +43,7 @@ export function require_non_empty_array<
4343
export function object_keys<
4444
T extends {[key: string]: unknown} = {[key: string]: unknown}
4545
>(
46-
object: T
46+
object: T,
4747
) : (keyof T)[] {
4848
return Object.keys(object);
4949
}

src/predicates.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function object_has_property<
66
>(
77
maybe: unknown,
88
property: Property,
9-
predicate: undefined|(predicate<Value>) = undefined
9+
predicate: undefined|(predicate<Value>) = undefined,
1010
): maybe is {[key: string]: unknown} & {[key in Property]: Value} {
1111
return (
1212
value_is_non_array_object(maybe)
@@ -22,7 +22,7 @@ export function object_has_only_properties_that_match_predicate<
2222
Value = unknown
2323
>(
2424
maybe: unknown,
25-
predicate:predicate<Value>
25+
predicate:predicate<Value>,
2626
): maybe is {[key: string]: Value} {
2727
return (
2828
value_is_non_array_object(maybe)
@@ -45,7 +45,7 @@ export function object_has_non_empty_array_property<
4545
property: Property,
4646
predicate:
4747
| undefined
48-
| (predicate<Value>) = undefined
48+
| (predicate<Value>) = undefined,
4949
): maybe is (
5050
& {[key: string]: unknown}
5151
& {[key in Property]: [Value, ...Value[]]}
@@ -59,15 +59,15 @@ export function object_has_non_empty_array_property<
5959
export function object_has_property_that_equals(
6060
maybe: unknown,
6161
property: string,
62-
expects: unknown
62+
expects: unknown,
6363
): maybe is {[key: string]: unknown} & {
6464
[key in typeof property]: typeof expects;
6565
} {
6666
return object_has_property(maybe, property) && expects === maybe[property];
6767
}
6868

6969
export function value_is_non_array_object(
70-
maybe: unknown
70+
maybe: unknown,
7171
): maybe is {[key: string]: unknown} {
7272
return (
7373
'object' === typeof maybe
@@ -80,7 +80,7 @@ export function is_non_empty_array<T = unknown>(
8080
maybe: unknown,
8181
predicate:
8282
| undefined
83-
| (predicate<T>) = undefined
83+
| (predicate<T>) = undefined,
8484
): maybe is [T, ...T[]] {
8585
return (
8686
maybe instanceof Array
@@ -92,7 +92,7 @@ export function is_non_empty_array<T = unknown>(
9292
export function object_only_has_that_property<T = unknown>(
9393
maybe: unknown,
9494
property: string,
95-
predicate: undefined | (predicate<T>) = undefined
95+
predicate: undefined | (predicate<T>) = undefined,
9696
): maybe is {[key in typeof property]: T} {
9797
return (
9898
value_is_non_array_object(maybe)

tests/src/ArrayUtilities.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void describe('non_empty_map', () => {
1414
void it('behaves', () => {
1515
assert.equal(
1616
non_empty_map([1,2,3], e => e).length,
17-
3
17+
3,
1818
);
1919
});
2020
})
@@ -23,11 +23,11 @@ void describe('non_empty_keys', () => {
2323
void it('behaves', () => {
2424
assert.equal(
2525
non_empty_keys({} as {[key: string]: unknown}).length,
26-
0
26+
0,
2727
);
2828
assert.deepEqual(
2929
non_empty_keys({foo: 1, bar: 1}),
30-
['foo', 'bar']
30+
['foo', 'bar'],
3131
);
3232
})
3333
})
@@ -45,7 +45,7 @@ void describe('object_keys', () => {
4545
void it('behaves', () => {
4646
assert.deepEqual(
4747
object_keys({foo: 1, bar: 2, baz: 3}),
48-
['foo', 'bar', 'baz']
48+
['foo', 'bar', 'baz'],
4949
);
5050
})
5151
})

tests/src/predicates.spec.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ void describe('object_has_property', () => {
4646
() => {
4747
assert.strictEqual(
4848
object_has_property(maybe, property, predicate),
49-
expectation
49+
expectation,
5050
)
51-
}
51+
},
5252
)
5353
}
5454
})
@@ -80,11 +80,11 @@ void describe('object_has_only_properties_that_match_predicate', () => {
8080
assert.strictEqual(
8181
object_has_only_properties_that_match_predicate(
8282
maybe,
83-
predicate
83+
predicate,
8484
),
85-
expectation
85+
expectation,
8686
)
87-
}
87+
},
8888
)
8989
}
9090
})
@@ -121,11 +121,11 @@ void describe('property_exists_on_object', () => {
121121
assert.strictEqual(
122122
property_exists_on_object(
123123
maybe,
124-
property
124+
property,
125125
),
126-
expectation
126+
expectation,
127127
)
128-
}
128+
},
129129
)
130130
}
131131
})
@@ -173,9 +173,9 @@ void describe('object_has_non_empty_array_property', () => {
173173
property,
174174
predicate,
175175
),
176-
expectation
176+
expectation,
177177
)
178-
}
178+
},
179179
)
180180
}
181181
})
@@ -209,9 +209,9 @@ void describe('object_has_property_that_equals', () => {
209209
property,
210210
expects,
211211
),
212-
expectation
212+
expectation,
213213
)
214-
}
214+
},
215215
)
216216
}
217217
})
@@ -243,9 +243,9 @@ void describe('value_is_non_array_object', () => {
243243
value_is_non_array_object(
244244
maybe,
245245
),
246-
expectation
246+
expectation,
247247
)
248-
}
248+
},
249249
)
250250
}
251251
})
@@ -284,9 +284,9 @@ void describe('is_non_empty_array', () => {
284284
maybe,
285285
predicate,
286286
),
287-
expectation
287+
expectation,
288288
)
289-
}
289+
},
290290
)
291291
}
292292
})
@@ -333,9 +333,9 @@ void describe('object_only_has_that_property', () => {
333333
property,
334334
predicate,
335335
),
336-
expectation
336+
expectation,
337337
)
338-
}
338+
},
339339
)
340340
}
341341
})
@@ -348,7 +348,7 @@ void describe('is_string', () => {
348348
)
349349
assert.strictEqual(
350350
is_string('foo'),
351-
true
351+
true,
352352
)
353353
})
354354
})

0 commit comments

Comments
 (0)