New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

shields-less

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shields-less

The badge making code extracted from the original badges/shields project

latest
Source
npmnpm
Version
0.2.2
Version published
Weekly downloads
7
133.33%
Maintainers
1
Weekly downloads
 
Created
Source

shields-less

English README | 中文README

Travis

npm Packagist

Features

see online demo

  • no dependencies
  • very small
  • support chinese character
  • support custom colors
  • support node and browser

Install

npm install shields-less

Usage

var shieldsLess = require('shields-less')
var svgBadge = shieldsLess.svg({
    leftText: 'npm 黄河远上白云间',
    rightText: 'hello 世界'
})

var svgBadge2 = shieldsLess.svg({
    leftText: 'npm 黄河远上白云间',
    rightText: 'hello 世界',
    style: 'square'
})

var svgBadge2 = shieldsLess.svg({
    leftText: 'npm 黄河远上白云间',
    rightText: 'hello 世界',
    leftColor: '#e64a19',
    rightColor: '#448aff',
    style: 'square' // jest two style: square and plat(default)
})

then you will get svg string

<svg xmlns="http://www.w3.org/2000/svg" width="188" height="20">
    <rect width="188" height="20" fill="#555"/>
    <rect x="118" width="70" height="20" fill="#97CA00"/>
    <rect x="118" width="4" height="20" fill="#97CA00"/>
    <rect width="188" height="20" fill-opacity=".1"/>
    <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
        <text x="60" y="14">npm 黄河远上白云间</text>
        <text x="152" y="14">hello 世界</text>
    </g>
    </svg>

Keywords

badge

FAQs

Package last updated on 25 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts