mirror of
https://github.com/JonasunderscoreJones/aka-worker.git
synced 2025-10-23 09:59:19 +02:00
Initial commit (by create-cloudflare CLI)
This commit is contained in:
parent
8cb86120f1
commit
fff961078a
1777 changed files with 1011798 additions and 0 deletions
17
cool-dawn-3d3b/node_modules/github-from-package/index.js
generated
vendored
Normal file
17
cool-dawn-3d3b/node_modules/github-from-package/index.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
module.exports = function (pkg) {
|
||||
var m;
|
||||
if (m = match(JSON.stringify(pkg.repository))) {
|
||||
return m;
|
||||
}
|
||||
else if (m = match(JSON.stringify(pkg))) {
|
||||
return m;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
function match (str) {
|
||||
var m = /\bgithub.com[:\/]([^\/"]+)\/([^\/"]+)/.exec(str);
|
||||
if (m) {
|
||||
return 'https://github.com/' + m[1] + '/' + m[2].replace(/\.git$/, '');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue