Socket
Socket
Sign inDemoInstall

parse-css-font

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-css-font - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

coverage/lcov-report/base.css

31

CHANGELOG.md

@@ -0,23 +1,34 @@

## 3.0.3
- Also exports a CommonJS module. Fixes `const parseCSSFont = require('parse-css-font');`.
## 3.0.2
- Fix parsing of `1rem / 1.2` when the slash is surrounded by spaces.
- Fix parsing of `1rem / 1.2` when the slash is surrounded by spaces.
## 3.0.1
- Fix readme.
- Add `package-lock.json`.
- Fix readme.
- Add `package-lock.json`.
## 3.0.0
- **Breaking:** Remove tcomb dependency. Breaking change if you were somehow relying on those errors.
- Introduce TypeScript.
- Provide TypeScript-generated type definitions.
- **Breaking:** Remove tcomb dependency. Breaking change if you were somehow relying on those errors.
- Introduce TypeScript.
- Provide TypeScript-generated type definitions.
## 2.0.2
- Update dependencies.
- Update dependencies.
## 2.0.1
- Fix issue w/ slashes in functions.
- Fix issue w/ slashes in functions.
## 2.0.0
- Preserves functions with spaces and commas inside.
- Preserves functions with spaces and commas inside.
## 1.0.0
- Initial release.
- Initial release.
export declare function isSize(value: string): boolean;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ export interface ISystemFont {

@@ -34,2 +34,3 @@ "use strict";

if (token === 'normal' || globalKeywords.indexOf(token) !== -1) {
;
['style', 'variant', 'weight', 'stretch'].forEach(function (prop) {

@@ -75,3 +76,5 @@ font[prop] = token;

}
font.family = cssListHelpers.splitByCommas(tokens.join(' ')).map(unquote);
font.family = cssListHelpers
.splitByCommas(tokens.join(' '))
.map(unquote);
return font;

@@ -100,1 +103,3 @@ }

}
// @ts-ignore
module.exports = Object.assign(exports.default, exports);
{
"name": "parse-css-font",
"version": "3.0.2",
"version": "3.0.3",
"description": "Parse the CSS font property value.",

@@ -8,32 +8,42 @@ "main": "dist/index.js",

"scripts": {
"clean": "rimraf coverage dist *.log css-list-helpers-*",
"clean": "rimraf coverage dist *.log* bem-join-*",
"codecov": "codecov -f coverage/lcov.info",
"prebuild": "npm run clean && npm run lint",
"lint": "tslint -p tsconfig.test.json",
"prebuild": "rimraf dist",
"build": "tsc",
"prebuild:watch": "npm run prebuild",
"build:watch": "tsc --watch",
"lint": "tslint --project tsconfig.test.json",
"pretest": "npm run build -- --project tsconfig.test.json",
"test": "nyc ava --verbose",
"watch": "concurrently \"npm run build:watch\" \"npm test -- --watch\"",
"prepack": "npm test && npm run build"
"precover": "rimraf coverage",
"cover": "jest --coverage",
"pretest": "npm run lint",
"test": "jest --watch",
"prepublishOnly": "npm run lint && npm run cover && npm run build"
},
"nyc": {
"lines": 100,
"statements": 100,
"functions": 100,
"branches": 100,
"include": [
"dist/**/*.js"
],
"exclude": [
"dist/**/*.test.js"
],
"reporter": [
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged",
"pre-push": "npm run lint"
}
},
"prettier": {
"arrowParens": "avoid",
"semi": false,
"singleQuote": true,
"trailingComma": "all"
},
"jest": {
"preset": "ts-jest",
"testEnvironment": "node",
"verbose": true,
"coverageDirectory": "coverage",
"coverageReporters": [
"lcov",
"text"
],
"cache": true,
"all": true,
"check-coverage": true
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
}
},

@@ -67,10 +77,16 @@ "repository": {

"devDependencies": {
"@types/node": "^10.1.2",
"ava": "^0.25.0",
"concurrently": "^3.5.1",
"nyc": "^11.8.0",
"rimraf": "^2.6.2",
"tslint": "^5.10.0",
"typescript": "^2.8.3"
"@jedmao/tsconfig": "^0.3.0",
"@jedmao/tslint": "^0.4.2",
"@types/jest": "^23.3.13",
"@types/node": "^10.12.18",
"husky": "^1.3.1",
"jest": "^24.0.0",
"prettier": "^1.16.1",
"pretty-quick": "^1.10.0",
"rimraf": "^2.6.3",
"ts-jest": "^23.10.5",
"tslint": "^5.12.1",
"tslint-config-prettier": "^1.17.0",
"typescript": "^3.2.4"
}
}

@@ -5,3 +5,6 @@ # parse-css-font

[![npm license](http://img.shields.io/npm/l/parse-css-font.svg?style=flat-square)](https://www.npmjs.org/package/parse-css-font)
[![Travis Build Status](https://img.shields.io/travis/jedmao/parse-css-font.svg?label=unix)](https://travis-ci.org/jedmao/parse-css-font)
[![Travis Build Status](https://img.shields.io/travis/jedmao/parse-css-font.svg)](https://travis-ci.org/jedmao/parse-css-font)
[![codecov](https://codecov.io/gh/jedmao/parse-css-font/branch/master/graph/badge.svg)](https://codecov.io/gh/jedmao/parse-css-font)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![Unicorn Approved](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://twitter.com/sindresorhus/status/457989012528316416?ref_src=twsrc%5Etfw&ref_url=https%3A%2F%2Fwww.quora.com%2FWhat-does-the-unicorn-approved-shield-mean-in-GitHub)

@@ -21,4 +24,4 @@ [![npm](https://nodei.co/npm/parse-css-font.svg?downloads=true)](https://nodei.co/npm/parse-css-font/)

```js
var parseCSSFont = require('parse-css-font');
parseCSSFont('1rem "Roboto Condensed", sans-serif;');
var parseCSSFont = require('parse-css-font')
parseCSSFont('1rem "Roboto Condensed", sans-serif;')
/*

@@ -42,3 +45,3 @@ {

```ts
import parseCSSFont from 'parse-css-font';
import parseCSSFont from 'parse-css-font'
```

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