Registry / serialization / font-family-papandreou

font-family-papandreou

JSON →
library0.2.0-patch2jsnpmunverified

The `font-family-papandreou` package provides a lightweight utility for parsing and stringifying CSS `font-family` property values. It converts a CSS font-family string (e.g., `"Helvetica Neue", Helvetica, sans-serif`) into an array of individual font names and vice-versa. The package is currently at version `0.2.0-patch2` and has been unmaintained for several years, with its last publish occurring over six years ago and last code commit in 2017. Its simplicity stems from having zero external runtime dependencies, making it a self-contained solution. However, due to its age and lack of active development, it primarily supports CommonJS modules and does not offer native TypeScript declarations or ESM compatibility, which are standard in modern JavaScript ecosystems. While functional for its niche, developers should be aware of its abandoned status and consider more contemporary alternatives for new projects.

npm install font-family-papandreou
INSTALL
IMPORT
SIG · FONT-FAMILY-PAPAND
F
font-family-papandreou
serializationjavascriptv0.2.0-patch2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse
const { parse } = require('font-family');
import { parse } from 'font-family-papandreou';
Despite the npm package name being `font-family-papandreou`, the module is exported internally as `font-family` and strictly uses CommonJS syntax. Direct ESM `import` statements will fail in native ESM environments.
stringify
const { stringify } = require('font-family');
import { stringify } from 'font-family-papandreou';
The `stringify` function is a named export from the internal `font-family` CommonJS module. ESM imports are not natively supported.

Demonstrates how to parse a CSS `font-family` string into an array and stringify an array back into a CSS `font-family` value using CommonJS `require`.

const { parse, stringify } = require('font-family'); // Example 1: Parsing a font-family string const fontString = '"Helvetica Neue", Helvetica, sans-serif'; const parsedFonts = parse(fontString); console.log('Parsed fonts:', parsedFonts); // Expected output: ['Helvetica Neue', 'Helvetica', 'sans-serif'] // Example 2: Stringifying an array of font names const fontArray = ['Arial Black', 'Arial', 'sans-serif']; const stringifiedFonts = stringify(fontArray); console.log('Stringified fonts:', stringifiedFonts); // Expected output: '"Arial Black", Arial, sans-serif'
Debug
Known issues
breakingThis package is effectively abandoned. It has not received updates for over six years, meaning it may contain unpatched bugs or security vulnerabilities and will not receive new features.
fix
Consider migrating to a more actively maintained library for CSS parsing or implementing custom parsing logic.
affects: >=0.2.0-patch2
breakingThe package is CommonJS (CJS) only. It does not provide native ECMAScript Modules (ESM) support. Attempting to use `import` syntax in a pure ESM environment will result in errors.
fix
Ensure your project or file uses CommonJS `require()` syntax. For ESM projects, you might need to use a bundler that transpiles CJS, or wrap the module in a CJS loader function, or switch to an ESM-compatible alternative.
affects: >=0.2.0-patch2
gotchaWhen installing `font-family-papandreou`, the `require` statement must use the module name `font-family` (e.g., `require('font-family')`), not the package name `font-family-papandreou`.
fix
Always use `require('font-family')` to import the module after installing `font-family-papandreou`.
affects: >=0.2.0-patch2
gotchaThis package does not provide TypeScript declaration files (`.d.ts`). Developers using TypeScript will not have type safety or auto-completion without manually creating declaration files.
fix
Create a `font-family.d.ts` file in your project or install `@types/font-family` if it existed (which it doesn't). Alternatively, use `// @ts-ignore` or cast types manually, but prefer migration to a typed library.
affects: >=0.2.0-patch2
Errors
Common errors & fixes
ReferenceError: require is not defined in ES module scope
Attempting to use `require()` in an ECMAScript Module (ESM) context.
fix
This package is CJS-only. Convert your file to use CJS or migrate to an ESM-compatible parsing library. If you must use it in ESM, ensure your bundler handles CJS interoperability correctly.
TypeError: Cannot read properties of undefined (reading 'parse') (or similar for 'stringify')
Incorrect module name in `require()` or `import` statement, or attempting to import a CJS module in an ESM context.
fix
Ensure you are using `const { parse, stringify } = require('font-family');` after installing `font-family-papandreou`. Do not use `require('font-family-papandreou')` or ESM `import`.
Upgrade
Version history
0.2.0-patch2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
font-family-papandreou — npm install font-family-papandreou · libregistry