You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
226 B
6 lines
226 B
4 months ago
|
import assertString from './util/assertString';
|
||
|
var magnetURI = /^magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32,40}&dn=.+&tr=.+$/i;
|
||
|
export default function isMagnetURI(url) {
|
||
|
assertString(url);
|
||
|
return magnetURI.test(url.trim());
|
||
|
}
|