File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ const IPv6AddressRegExp = new RegExp('^(' +
4242 `(?:${ IPv6SegmentFormat } :){2}(?:(:${ IPv6SegmentFormat } ){0,3}:${ IPv4AddressFormat } |(:${ IPv6SegmentFormat } ){1,5}|:)|` +
4343 `(?:${ IPv6SegmentFormat } :){1}(?:(:${ IPv6SegmentFormat } ){0,4}:${ IPv4AddressFormat } |(:${ IPv6SegmentFormat } ){1,6}|:)|` +
4444 `(?::((?::${ IPv6SegmentFormat } ){0,5}:${ IPv4AddressFormat } |(?::${ IPv6SegmentFormat } ){1,7}|:))` +
45- ')(%[0-9a-zA-Z-.: ]{1,})?$' ) ;
45+ ')(%[0-9a-zA-Z. ]{1,})?$' ) ;
4646
4747export default function isIP ( ipAddress , options = { } ) {
4848 assertString ( ipAddress ) ;
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ describe('isIP', () => {
7070 '2001:db8:0000:1:1:1:1::1' ,
7171 '0:0:0:0:0:0:ffff:127.0.0.1' ,
7272 '0:0:0:0:ffff:127.0.0.1' ,
73+ 'BC:e4d5:c:e7b9::%40i0nccymtl9cwfKo.5vaeXLSGRMe:EDh2qs5wkhnPws5xQKqafjfAMm6wGFCJ.bVFsZfb' ,
74+ '1dC:0DF8:62D:3AC::%KTatXocjaFVioS0RTNQl4mA.V151o0RSy.JIu-D-D8.d3171ZWsSJ7PK4YjkJCRN0F' ,
7375 ] ,
7476 } ) ;
7577
You can’t perform that action at this time.
0 commit comments