Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sarhan Aissi <tux-tn@users.noreply.github.com>
  • Loading branch information
Rhilip and tux-tn committed Jun 29, 2022
1 parent 369a79c commit 6c94aae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isMagnetURI.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assertString from './util/assertString';

const magnetURIComponent = /[?&]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;
const 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);
Expand Down

0 comments on commit 6c94aae

Please sign in to comment.