<script src="https://jc3213.github.io/metalink.js/metalink.js"></script>// @require https://jc3213.github.io/metalink.js/metalink.jslet file1 = {url: {url: 'https://jc3213.github.io/metalink.js/metalink.js', location: 'en'}, version: '0.1.0'};
let file2 = {url: 'https://github.com/jc3213/metalink.js/archive/refs/heads/main.zip', name: 'metalink.js_by_@jc3213.zip'}
let metalink = new Metalink(file1, file2);- The download url(s) of the file
- required
stringobject: { url, location }url:stringlocation:string
array: [ string1, string2, string3, ... ]array: [ object1, object2, object3, ... ]
- The name of the file
- required
string
- The size of the file
- optional
integer
- The version of the file
- optional
string
- The language of the file
- optional
string
- The hash(es) of the file
- optional
array: [ object1, object2, object3, ... ]- object: { type, url }
- type:
string - url:
string
- The metalink(s) of the file
- optional
array: [ object1, object2, object3, ... ]- object: { type, url }
- type:
string - url:
string
metalink.save(filename);- filename
String- The file name you'd like to save
- Default
metalink_yymmdd_hhmmss