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

css-font

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

css-font - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

2

package.json
{
"name": "css-font",
"version": "1.1.1",
"version": "1.2.0",
"description": "Parse or stringify CSS font property.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -12,5 +12,14 @@ 'use strict'

module.exports = function parseFont (value) {
module.exports = parseFont
var cache = parseFont.cache = {}
function parseFont (value) {
if (typeof value !== 'string') throw new Error('Font argument must be a string.')
if (cache[value]) return cache[value]
if (value === '') {

@@ -21,3 +30,3 @@ throw new Error('Cannot parse an empty string.')

if (systemFontKeywords.indexOf(value) !== -1) {
return { system: value }
return cache[value] = {system: value}
}

@@ -43,3 +52,4 @@

})
return font
return cache[value] = font
}

@@ -84,3 +94,3 @@

return font
return cache[value] = font
}

@@ -87,0 +97,0 @@

@@ -38,3 +38,3 @@ 'use strict'

stretch: 'stretch font-stretch fontStretch fontstretch width',
size: 'size s font-size fontSize fontsize height',
size: 'size s font-size fontSize fontsize height em emSize',
lineHeight: 'lh line-height lineHeight lineheight leading',

@@ -41,0 +41,0 @@ family: 'font family fontFamily font-family fontfamily type typeface face',

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