This commit is contained in:
2026-03-03 15:23:00 +00:00
parent 5e3726de39
commit 8e223bfbec
3689 changed files with 955330 additions and 1011 deletions

9
node_modules/validator/es/lib/isMagnetURI.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
import assertString from './util/assertString';
var magnetURIComponent = /(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;
export default function isMagnetURI(url) {
assertString(url);
if (url.indexOf('magnet:?') !== 0) {
return false;
}
return magnetURIComponent.test(url);
}