Check if url
is a badge.
- What is this?
- When should I use this?
- Install
- Use
- API
- Data
- Types
- Compatibility
- Contribute
- Security
- License
This is a tiny package that checks if a given url points to a badge.
You can use this package for example to filter out badges.
This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:
npm install is-badge
In Deno with esm.sh
:
import {isBadge} from 'https://esm.sh/is-badge@2'
In browsers with esm.sh
:
<script type="module">
import {isBadge} from 'https://esm.sh/is-badge@2?bundle'
</script>
import {isBadge} from 'is-badge'
isBadge('https://img.shields.io/travis/joyent/node.svg') // => true
isBadge('https://example.com') // => false
This package exports the identifier isBadge
.
There is no default export.
Check if url
is a badge.
This project supports:
-
codeclimate
-
codecov
-
coveralls
-
david-dm
-
fury.io
-
github.com
workflows -
gitter
-
inch-ci
-
issuestats
-
nodei.co
-
saucelabs
-
shields.io
-
testling
-
travis-ci
-
opencollective
This package is fully typed with TypeScript. It exports no additional types.
This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers.
Yes please! See How to Contribute to Open Source.
This package is safe.