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

google-fonts-css2

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-fonts-css2 - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "google-fonts-css2",
"version": "1.0.2",
"version": "1.0.3",
"private": false,

@@ -5,0 +5,0 @@ "description": "A helper package to interact with google fonts API.",

@@ -32,3 +32,3 @@ # Google Fonts CSS2

- Wonkiness - `WONK`
-
[https://developers.google.com/fonts/docs/css2](https://developers.google.com/fonts/docs/css2)

@@ -38,3 +38,2 @@ [https://fonts.google.com/variablefonts](https://fonts.google.com/variablefonts)

## Usage:

@@ -48,28 +47,29 @@ ```javascript

let url = assembleCommon([
{
family: "Cabin", //Family Name
styles: [
"600..700", //Range, if family supports it.
"100..200italic", //Range with italic
"300italic", //Weight with italic
"regular", // Shortcut to 400
"italic", //Shortcut to 400 Italic
"500", //regular with weight
444 //regular weight for variable font
]
},
{
family: "Roboto", //Family Name - Roboto doesn't support ranges
styles: [
"300italic", //Weight with italic
"regular", // Shortcut to 400
"italic", //Shortcut to 400 Italic
"500",
100
]
},
], 'swap') //display style
let url = assembleCommon([
{
family: "Cabin", // Family Name
styles: [
"600..700", // Range, if family supports it.
"100..200italic", // Range with italic
"300italic", // Weight with italic
"regular", // Shortcut to 400
"italic", // Shortcut to 400 Italic
"500", // Regular with weight
444 // Regular weight for variable font
]
},
{
family: "Roboto", // Family Name - Roboto doesn't support ranges
styles: [
"300italic", // Weight with italic
"regular", // Shortcut to 400
"italic", // Shortcut to 400 Italic
"500",
100
]
},
], 'swap') // Display Style
//The output will be:
// The output will be:
"https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400;0,444;0,500;0,600..700;1,100..200;1,300;1,400;1,600..700&family=Roboto:ital,wght@0,100;0,400;0,500;1,300;1,400&display=auto"

@@ -76,0 +76,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