|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the following will be processed for @license / @license-end
method:
// foo.js
// // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0
// document.getElementById('bar');
// // @license-end
function foo(x, y) {
console.log(x + y);
}
$ node ./utitlities/check-script foo.js
[
true,
'// // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0\n' +
"// document.getElementById('bar');\n" +
'// // @license-end\n' +
'function foo(x, y) {\n' +
' console.log(x + y);\n' +
'}\n',
'\n' +
'Recognized license: "GNU General Public License (GPL) version 3".\n' +
'Script appears to be trivial.'
]
|