Skip to content

Commit a5e9b28

Browse files
committed
📝 Add Codecov badge to README.md
1 parent 10b00d7 commit a5e9b28

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/unknownutil/mod.ts)
66
[![Test](https://github.com/lambdalisue/deno-unknownutil/workflows/Test/badge.svg)](https://github.com/lambdalisue/deno-unknownutil/actions?query=workflow%3ATest)
77
[![npm version](https://badge.fury.io/js/unknownutil.svg)](https://badge.fury.io/js/unknownutil)
8+
[![codecov](https://codecov.io/github/lambdalisue/deno-unknownutil/graph/badge.svg?token=pfbLRGU5AM)](https://codecov.io/github/lambdalisue/deno-unknownutil)
89

910
A utility pack for handling `unknown` type.
1011

@@ -15,7 +16,7 @@ A utility pack for handling `unknown` type.
1516
It provides `is` module for type predicate functions and `assert`, `ensure`, and
1617
`maybe` helper functions.
1718

18-
### is*
19+
### is\*
1920

2021
Type predicate function is a function which returns `true` if a given value is
2122
expected type. For example, `isString` (or `is.String`) returns `true` if a
@@ -39,24 +40,23 @@ import { is, PredicateType } from "./mod.ts";
3940
const isArticle = is.ObjectOf({
4041
title: is.String,
4142
body: is.String,
42-
refs: is.ArrayOf(is.OneOf([
43-
is.String,
44-
is.ObjectOf({
45-
name: is.String,
46-
url: is.String,
47-
}),
48-
])),
43+
refs: is.ArrayOf(
44+
is.OneOf([
45+
is.String,
46+
is.ObjectOf({
47+
name: is.String,
48+
url: is.String,
49+
}),
50+
])
51+
),
4952
});
5053

5154
type Article = PredicateType<typeof isArticle>;
5255

5356
const a: unknown = {
5457
title: "Awesome article",
5558
body: "This is an awesome article",
56-
refs: [
57-
{ name: "Deno", url: "https://deno.land/" },
58-
"https://github.com",
59-
],
59+
refs: [{ name: "Deno", url: "https://deno.land/" }, "https://github.com"],
6060
};
6161
if (isArticle(a)) {
6262
// a is narrowed to the type of `isArticle`

0 commit comments

Comments
 (0)