2.1.1 • Published 3 years ago
is-badge v2.1.1
is-badge
Check if url is a badge.
Contents
What is this?
This is a tiny package that checks if a given url points to a badge.
When should I use this?
You can use this package for example to filter out badges.
Install
This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:
npm install is-badgeIn 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>Use
import {isBadge} from 'is-badge'
isBadge('https://img.shields.io/travis/joyent/node.svg') // => true
isBadge('https://example.com') // => falseAPI
This package exports the identifier isBadge.
There is no default export.
isBadge(url)
Check if url is a badge.
Data
This project supports:
codeclimatecodecovcoverallsdavid-dmfury.iogithub.comworkflowsgitterinch-ciissuestatsnodei.cosaucelabsshields.iotestlingtravis-ciopencollective
Types
This package is fully typed with TypeScript. It exports no additional types.
Compatibility
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.
Contribute
Yes please! See How to Contribute to Open Source.
Security
This package is safe.