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

detect-readme-badges

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detect-readme-badges - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

lib/codecov.js

6

lib/coveralls.js
'use strict';
// https://coveralls.io/repos/github/${user}/${repo}/badge.svg?branch=${branch}
// https://coveralls.io/repos/${service}/${user}/${repo}/badge.svg?branch=${branch}
// https://coveralls.io/repos/${user}/${repo}/badge.svg?branch=${branch}

@@ -14,8 +14,12 @@ // https://img.shields.io/coveralls/${user}/${repo}.svg

if ((match = url.match(/img.shields.io\/coveralls\/(.+)\/(.+)\/(.+)\..+/))) {
// shields badge with branch
data = { user: match[1], repo: match[2], branch: match[3] };
} else if ((match = url.match(/img.shields.io\/coveralls\/(.+)\/(.+)\..+/))) {
// shields badge
data = { user: match[1], repo: match[2] };
} else if ((match = url.match(/coveralls.io\/repos\/(.+)\/(.+)\/(.+)\/badge\..+/))) {
// coveralls badge with service
data = { service: match[1], user: match[2], repo: match[3], branch: parsedUrl.query.branch };
} else if ((match = url.match(/coveralls.io\/repos\/(.+)\/(.+)\/badge\..+/))) {
// coveralls badge
data = { user: match[1], repo: match[2], branch: parsedUrl.query.branch, service: parsedUrl.query.service };

@@ -22,0 +26,0 @@ } else {

2

package.json
{
"name": "detect-readme-badges",
"version": "1.0.0",
"version": "1.1.0",
"description": "Scans a repository's readme file, searching for badges",

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

@@ -1,2 +0,2 @@

# node-detect-readme-badges
# detect-readme-badges

@@ -82,5 +82,5 @@ > Scans a repository's readme file, searching for badges

**`info.type`** type of the badge. Available types are `build`, `coverage`, `downloads`, `version` and `dependencies`.
**`info.type`** type of the badge. Available types are `build`, `coverage`, `downloads`, `version`, `dependencies` and `misc`.
**`info.service`** is the service that provides the badge. Available services are `coveralls`, `david`, `npm` (shields.io or nodei.co), and `travis`.
**`info.service`** is the service that provides the badge. Available services are [coveralls](https://coveralls.io), [david](https://david-dm.org), npm ([shields.io](https://shields.io) or [nodei.co](https://nodei.co)), [travis](https://travis-ci.org) and [gitter](https://gitter.im).

@@ -92,3 +92,3 @@ **`info.modifiers`** are the badge modifiers that alter the interpretation of the repo/package depending on the service.

`$ npm test`
`$ npm test`
`$ npm test-cov` to get coverage report

@@ -95,0 +95,0 @@

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