Skip to content

Commit

Permalink
address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
yuth committed Oct 12, 2021
1 parent 249ccac commit 3244bd0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { URL } from 'url';
import { GraphQLInt, GraphQLScalarType, GraphQLError, Kind, StringValueNode, ValueNode } from 'graphql';
import { isValidNumber } from 'libphonenumber-js';
import * as ip from 'ip';
import * as net from 'net';

import { GraphQLDate, GraphQLTime, GraphQLDateTime } from 'graphql-iso-date';

Expand Down Expand Up @@ -118,7 +118,7 @@ const validateIPAddress = value => {
if (typeof value !== 'string') {
throw new TypeError(`Value is not string: ${value}`);
}
if (ip.isV4Format(value) || ip.isV6Format(value)) {
if (net.isIPv4(value) || net.isIPv6(value)) {
return value;
}

Expand Down

0 comments on commit 3244bd0

Please sign in to comment.