mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-29 08:58:23 +08:00
added is-url
This commit is contained in:
8
is-url/is-url-tests.ts
Normal file
8
is-url/is-url-tests.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/// <reference path="./is-url.d.ts" />
|
||||
|
||||
import isUrl = require('is-url');
|
||||
|
||||
var isValid0: boolean = isUrl('https://github.com/segmentio/is-url');
|
||||
var isValid1: boolean = isUrl('hogepiyo');
|
||||
var isValid2: boolean = isUrl('');
|
||||
var isValid3: boolean = isUrl(undefined);
|
||||
10
is-url/is-url.d.ts
vendored
Normal file
10
is-url/is-url.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// Type definitions for is-url v1.2.1
|
||||
// Project: https://github.com/segmentio/is-url
|
||||
// Definitions by: Ryota Murohoshi <https://github.com/RyotaMurohoshi>
|
||||
// Definitions: https://github.com/RyotaMurohoshi/DefinitelyTyped
|
||||
|
||||
declare module "is-url" {
|
||||
export = isUrl
|
||||
|
||||
function isUrl(string: string): boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user