Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
28 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,5 +89,8 @@ | |
}, | ||
"pre-commit": [ | ||
"lint-staged" | ||
] | ||
], | ||
"dependencies": { | ||
"url-regex": "^5.0.0" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
yiminghe
via email
Author
Owner
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import AsyncValidator from '../src/'; | ||
|
||
const validator = new AsyncValidator({ | ||
v: { | ||
type: 'url', | ||
}, | ||
}); | ||
|
||
for (var i = 1; i <= 50000; i++) { | ||
var time = Date.now(); | ||
var attack_str = '//' + ':'.repeat(i * 10000) + '@'; | ||
validator.validate({ | ||
v: attack_str, | ||
}); | ||
var time_cost = Date.now() - time; | ||
console.log( | ||
'attack_str.length: ' + attack_str.length + ': ' + time_cost + ' ms', | ||
); | ||
} |
这里有 break change: https://github.com/ant-design/ant-design/pull/32534/checks?check_run_id=3921682542