Skip to content

Commit

Permalink
Varaible type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Joscplan committed May 23, 2019
1 parent c68ab22 commit e9b9a41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 31,7 @@ export function slugify(

export namespace slugify {
export interface Options {
remove?: string;
remove?: RegExp;
replacement?: string;
lower?: boolean;
}
Expand Down
6 changes: 3 additions & 3 deletions mod_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 42,15 @@ test({
test({
name: "options.replacement",
fn(): void {
assertEquals(slugify("foo bar baz", { replacement: "_" }), "foo_bar_baz");
assertEquals(slugify("foo bar baz", null, { replacement: "_" }), "foo_bar_baz");
}
});

test({
name: "options.remove",
fn(): void {
assertEquals(
slugify("foo * ~.() bar '\"!:@ baz", { remove: /[$*_ ~.()'"!\-:@]/g }),
slugify("foo * ~.() bar '\"!:@ baz", null, { remove: /[$*_ ~.()'"!\-:@]/g }),
"foo-bar-baz"
);
}
Expand All @@ -59,7 59,7 @@ test({
test({
name: "options.lower",
fn(): void {
assertEquals(slugify("Foo bAr baZ", { lower: true }), "foo-bar-baz");
assertEquals(slugify("Foo bAr baZ", null, { lower: true }), "foo-bar-baz");
}
});

Expand Down

0 comments on commit e9b9a41

Please sign in to comment.