mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Move existing types to v2 folder
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for ip-regex 2.0
|
||||
// Project: https://github.com/sindresorhus/ip-regex
|
||||
// Definitions by: Daniel Perez Alvarez <https://github.com/unindented>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/** Regular expression for matching IP addresses (IPv4 & IPv6). */
|
||||
declare function ipRegex(options?: {
|
||||
/** Only match an exact string. Useful with RegExp#test to check if a string is an IP address. */
|
||||
exact?: boolean;
|
||||
}): RegExp;
|
||||
|
||||
export = ipRegex;
|
||||
@@ -0,0 +1,7 @@
|
||||
import ipRegex = require('ip-regex');
|
||||
|
||||
ipRegex().test('unicorn 192.168.0.1');
|
||||
|
||||
ipRegex({exact: true}).test('unicorn 192.168.0.1');
|
||||
|
||||
'unicorn 192.168.0.1 cake 1:2:3:4:5:6:7:8 rainbow'.match(ipRegex());
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"ip-regex-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user