format: prettify entire project

This commit is contained in:
Rim
2025-04-02 06:50:39 -04:00
parent 86f0782a98
commit 7ccc0be712
1711 changed files with 755867 additions and 235931 deletions

View File

@ -1,8 +1,8 @@
{
"name": "beep-boop",
"version": "1.2.3",
"repository" : {
"type" : "git",
"repository": {
"type": "git",
"url": "git@github.com:substack/beep-boop.git"
}
}

View File

@ -1,17 +1,16 @@
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;
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$/, '');
}
function match(str) {
var m = /\bgithub.com[:\/]([^\/"]+)\/([^\/"]+)/.exec(str);
if (m) {
return 'https://github.com/' + m[1] + '/' + m[2].replace(/\.git$/, '');
}
}

View File

@ -1,30 +1,30 @@
{
"name" : "github-from-package",
"version" : "0.0.0",
"description" : "return the github url from a package.json file",
"main" : "index.js",
"devDependencies" : {
"tap" : "~0.3.0",
"tape" : "~0.1.5"
},
"scripts" : {
"test" : "tap test/*.js"
},
"repository" : {
"type" : "git",
"url" : "git://github.com/substack/github-from-package.git"
},
"homepage" : "https://github.com/substack/github-from-package",
"keywords" : [
"github",
"package.json",
"npm",
"repository"
],
"author" : {
"name" : "James Halliday",
"email" : "mail@substack.net",
"url" : "http://substack.net"
},
"license" : "MIT"
"name": "github-from-package",
"version": "0.0.0",
"description": "return the github url from a package.json file",
"main": "index.js",
"devDependencies": {
"tap": "~0.3.0",
"tape": "~0.1.5"
},
"scripts": {
"test": "tap test/*.js"
},
"repository": {
"type": "git",
"url": "git://github.com/substack/github-from-package.git"
},
"homepage": "https://github.com/substack/github-from-package",
"keywords": [
"github",
"package.json",
"npm",
"repository"
],
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"license": "MIT"
}