Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update types to match validator 7.0.0 #9

Merged
merged 1 commit into from
Jun 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for validator.js v5.7.0
// Type definitions for validator.js v7.0.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>

Expand Down Expand Up @@ -55,9 +55,6 @@ declare namespace validator {
// 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 @@ -136,7 +133,7 @@ declare namespace validator {
isMultibyte(str: string): boolean;

// check if the string is null.
isNull(str: string): boolean;
isEmpty(str: string): boolean;

// check if the string contains only numbers.
isNumeric(str: string): boolean;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@types/validator",
"version": "5.7.0",
"version": "7.0.0",
"private": true,
"scripts": {
"build": "tsc -p . && typings bundle -o dist/main.d.ts",
Expand Down
4 changes: 1 addition & 3 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ let any: any;

result = validator.isDataURI('sample');

result = validator.isDate('sample');

result = validator.isDecimal('sample');

result = validator.isDivisibleBy('sample', 2);
Expand Down Expand Up @@ -105,7 +103,7 @@ let any: any;

result = validator.isMultibyte('sample');

result = validator.isNull('sample');
result = validator.isEmpty('sample');

result = validator.isNumeric('sample');

Expand Down
2 changes: 1 addition & 1 deletion typings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "validator",
"main": "index.d.ts",
"version": "5.7.0",
"version": "7.0.0",
"dependencies": {}
}