added is-url

This commit is contained in:
Ryota Murohoshi
2016-02-10 16:37:56 +09:00
parent 12b6445d85
commit 34593c565c
2 changed files with 18 additions and 0 deletions

8
is-url/is-url-tests.ts Normal file
View 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
View 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;
}