/TechnologyShields

Simple NPM package for generating shields.io URLs from Simple Icons 📄

Primary LanguageTypeScriptMIT LicenseMIT

TechnologyShields

npm build status codecov

TechnologyShields is a simple NPM package for generating shields.io URLs from Simple Icons slugs.

Installation

npm install technology-shields

Usage

ℹ️ Because this package uses simple-icons, we ask that all users read their legal disclaimer before using icons from Simple Icons.

TechnologyShields exports get function with alias Get. It takes 3 arguments:

Parameter Type Required Default Description
name string Yes Simple icons slug. See all slugs.
type ExportType or string No ExportType.MARKDOWN Type of the exported shield, see below
includeURL boolean No true Should image be wrapped in URL to the service. No effect if URL export type is selected

Export Type

If you are using Typescript, you can specify the export type using exported ExportType enum. If you don't want to or you are using Javascript, you can just provide a string. Available export options are:

  • URL - Export raw shield URL.
  • MARKDOWN - Export shield as markdown code.
  • HTML - Export shield as html code.

Simple usage

const technologyShields = require("technology-shields")

console.log(technologyShields.get("typescript", "MARKDOWN"))

Output:

TypeScript

Multiple shields

const technologyShields = require("technology-shields")

console.log(technologyShields.get(["github", "typescript", "codecov", "git", "visualstudiocode", "eslint"], "MARKDOWN"))

Output:

GitHub TypeScript Codecov Git Visual Studio Code ESLint