Gathering detailed insights and metrics for css-font-face-src
Gathering detailed insights and metrics for css-font-face-src
Gathering detailed insights and metrics for css-font-face-src
Gathering detailed insights and metrics for css-font-face-src
npm install css-font-face-src
Typescript
Module System
Node Version
NPM Version
92.1
Supply Chain
99.6
Quality
75.6
Maintenance
100
Vulnerability
100
License
TypeScript (97.59%)
JavaScript (2.41%)
Total Downloads
2,017,136
Last Day
2,463
Last Week
10,165
Last Month
44,597
Last Year
558,824
8 Stars
48 Commits
3 Forks
2 Watching
2 Branches
3 Contributors
Minified
Minified + Gzipped
Latest Version
2.0.0
Package Id
css-font-face-src@2.0.0
Unpacked Size
99.45 kB
Size
14.19 kB
File Count
29
NPM Version
8.1.2
Node Version
16.13.2
Publised On
24 Jan 2024
Cumulative downloads
Total Downloads
Last day
10.2%
2,463
Compared to previous day
Last week
-13.6%
10,165
Compared to previous week
Last month
15.3%
44,597
Compared to previous month
Last year
48.9%
558,824
Compared to previous year
@font-face
rule src
field parser – css-font-face-src
A CSS @font-face src
property value parser.
Basically it provides two operations:
parse
: To convert a CSS property string to an array of easily readable objects. Each object either describes a local font (referenced using its family name) or a remote font (referenced using its URL).serialize
: To convert an object array back to a CSS property string.require
)1const parser = require('css-font-face-src'); 2 3console.log(parser.parse('local("The Font"), url("font.otf") format("opentype"), url("font.woff"), local("Another Font")'));
will return:
1[ 2 { local: 'The Font' }, 3 { url: 'font.otf', format: 'opentype' }, 4 { url: 'font.woff' }, 5 { local: 'Another Font' } 6]
1const parser = require('css-font-face-src'); 2 3console.log( 4 parser.serialize([ 5 { local: 'The Font' }, 6 { url: 'font.otf', format: 'opentype' }, 7 { url: 'font.woff' }, 8 { local: 'Another Font' } 9 ]) 10);
will return:
1'local("The Font"), url("font.otf") format("opentype"), url("font.woff"), local("Another Font")'
import
)1import { parse } from 'css-font-face-src'; 2 3console.log(parse('local("The Font"), url("font.otf") format("opentype"), url("font.woff"), local("Another Font")'));
will return:
1[ 2 { local: 'The Font' }, 3 { url: 'font.otf', format: 'opentype' }, 4 { url: 'font.woff' }, 5 { local: 'Another Font' } 6]
1import { serialize } from 'css-font-face-src'; 2 3console.log( 4 serialize([ 5 { local: 'The Font' }, 6 { url: 'font.otf', format: 'opentype' }, 7 { url: 'font.woff' }, 8 { local: 'Another Font' } 9 ]) 10);
will return:
1'local("The Font"), url("font.otf") format("opentype"), url("font.woff"), local("Another Font")'
1import { parse } from 'css-font-face-src'; 2 3console.log(parse('local("The Font"), url("font.otf") format("opentype"), url("font.woff"), local("Another Font")'));
will return:
1[ 2 { local: 'The Font' }, 3 { url: 'font.otf', format: 'opentype' }, 4 { url: 'font.woff' }, 5 { local: 'Another Font' } 6]
1import { serialize, FontFaceSrcItem } from 'css-font-face-src'; 2 3console.log( 4 serialize([ 5 { local: 'The Font' }, 6 { url: 'font.otf', format: 'opentype' }, 7 { url: 'font.woff' }, 8 { local: 'Another Font' } 9 ] as FontFaceSrcItem[]) 10);
will return:
1'local("The Font"), url("font.otf") format("opentype"), url("font.woff"), local("Another Font")'
Christoph Burgmer. Licensed under BSD-2-Clause. Reach out on Twitter.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 2/17 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
12 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More