Merge pull request #8033 from RyotaMurohoshi/feature/added_is-url

Add typings for is-url v1.2.1
This commit is contained in:
Masahiro Wakame
2016-02-12 00:29:36 +09:00
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;
}