Skip to content

Commit

Permalink
validator (v7.0): remove isDate()
Browse files Browse the repository at this point in the history
  • Loading branch information
builtinnya committed Feb 20, 2018
1 parent 070eb12 commit af0fdee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
11 changes: 2 additions & 9 deletions types/validator/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Type definitions for validator.js v6.3
// Type definitions for validator.js v7.0
// Project: https://github.com/chriso/validator.js
// Definitions by: tgfjt <https://github.com/tgfjt>
// Ilya Mochalov <https://github.com/chrootsu>
// Ayman Nedjmeddine <https://github.com/IOAyman>
// Louy Alakkad <https://github.com/louy>
// Kacper Polak <https://github.com/kacepe>
// Bonggyun Lee <https://github.com/deptno>
// Naoto Yokoyama <https://github.com/builtinnya>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare namespace ValidatorJS {
Expand Down Expand Up @@ -66,9 +67,6 @@ declare namespace ValidatorJS {
// check if the string is a data uri format (https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs)
isDataURI(str: string): boolean;

// check if the string is a date.
isDate(str: string): boolean;

// check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc.
isDecimal(str: string): boolean;

Expand Down Expand Up @@ -406,11 +404,6 @@ declare module "validator/lib/isDataURI" {
export = isDataURI;
}

declare module "validator/lib/isDate" {
const isDate: typeof validator.isDate;
export = isDate;
}

declare module "validator/lib/isDecimal" {
const isDecimal: typeof validator.isDecimal;
export = isDecimal;
Expand Down
6 changes: 0 additions & 6 deletions types/validator/validator-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import isByteLengthFunc = require('validator/lib/isByteLength');
import isCreditCardFunc = require('validator/lib/isCreditCard');
import isCurrencyFunc = require('validator/lib/isCurrency');
import isDataURIFunc = require('validator/lib/isDataURI');
import isDateFunc = require('validator/lib/isDate');
import isDecimalFunc = require('validator/lib/isDecimal');
import isDivisibleByFunc = require('validator/lib/isDivisibleBy');
import isEmailFunc = require('validator/lib/isEmail');
Expand Down Expand Up @@ -113,9 +112,6 @@ import whitelistFunc = require('validator/lib/whitelist');
let _isDataURI = validator.isDataURI;
_isDataURI = isDataURIFunc;

let _isDate = validator.isDate;
_isDate = isDateFunc;

let _isDecimal = validator.isDecimal;
_isDecimal = isDecimalFunc;

Expand Down Expand Up @@ -378,8 +374,6 @@ let any: any;

result = validator.isDataURI('sample');

result = validator.isDate('sample');

result = validator.isDecimal('sample');

result = validator.isDivisibleBy('sample', 2);
Expand Down

0 comments on commit af0fdee

Please sign in to comment.