Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

default-branch

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

default-branch - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

7

index.js

@@ -31,14 +31,13 @@ 'use strict';

try {
const regexMatch = regexp.exec(data)[1];
// The first item (0) will be at the top and will be the default branch
const regexMatch = data.match(regexp)[0].split('=')[1].split('"')[0];
return resolve(regexMatch);
} catch (err) {
reject(new Error('Failed to get default branch: ' + err));
return;
return reject(new Error('Failed to get default branch: ' + err));
}
});
}).on('error', (error) => {
reject(error);
return reject(error);
});
});
};
{
"name": "default-branch",
"version": "1.0.6",
"version": "1.0.7",
"description": "Get the default branch of a GitHub repository",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc