{"_id":"css-font-face-src","_rev":"20-94f0b9be86eb420fb3651a7bd63d7a55","name":"css-font-face-src","dist-tags":{"latest":"2.1.0"},"versions":{"0.1.0":{"name":"css-font-face-src","version":"0.1.0","keywords":["css","parser","value","font","font-face"],"author":{"name":"Christoph Burgmer","email":"christoph.burgmer@gmail.com"},"license":"BSD-2-Clause","_id":"css-font-face-src@0.1.0","maintainers":[{"name":"cburgmer","email":"christoph.burgmer@gmail.com"}],"bugs":{"url":"https://github.com/cburgmer/css-font-face-src/issues"},"dist":{"shasum":"104e52718c3f63a5cd5c3330f6df1fab819a1183","tarball":"https://registry.npmjs.org/css-font-face-src/-/css-font-face-src-0.1.0.tgz","integrity":"sha512-FR00/TNrxG1MFhm0M47k9sZGSe4vVct8dfTKNb1YZKZU34qvpsdyN48VQqKZXbjKgExqfot/UznRvY2VCB6VEg==","signatures":[{"sig":"MEYCIQD0DlAVEFgitIFZS5TmiJn6U/HsOH335CHDrEtQ0ai/pgIhAN6dy3A5fuVSdQmSeWhocEQihYroaosEePyT8QF46OPq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","scripts":{"test":"jshint lib/ test/ && jasmine-node test/ --captureExceptions"},"_npmUser":{"name":"cburgmer","email":"christoph.burgmer@gmail.com"},"repository":{"url":"git://github.com/cburgmer/css-font-face-src","type":"git"},"_npmVersion":"1.3.11","description":"A CSS @font-face src property value parser","directories":{},"devDependencies":{"jshint":"~2.5.0","jasmine-node":"~1.14.3"}},"0.2.0":{"name":"css-font-face-src","version":"0.2.0","keywords":["css","parser","value","font","font-face"],"author":{"name":"Christoph Burgmer","email":"christoph.burgmer@gmail.com"},"license":"BSD-2-Clause","_id":"css-font-face-src@0.2.0","maintainers":[{"name":"cburgmer","email":"christoph.burgmer@gmail.com"}],"homepage":"https://github.com/cburgmer/css-font-face-src","bugs":{"url":"https://github.com/cburgmer/css-font-face-src/issues"},"dist":{"shasum":"12553310ac308c7ddf98e536cb6b9c3e6dc454f8","tarball":"https://registry.npmjs.org/css-font-face-src/-/css-font-face-src-0.2.0.tgz","integrity":"sha512-boWUvwfqW47V/3Ev1oMgefqVSWmCYsjtYWASCGfCjkcu0SBIjk9Yo6VCSdgEE17cmcCpf8T4rgCwYZApzRUxkA==","signatures":[{"sig":"MEUCIAXMXITclwPA9ylBMyVJhfe1NuXaXb3lkCyXCaePWsJPAiEA1SRdW6lpS2kUHTbQSuBd8tXzIwJM8He9WC9f1RaTM/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","scripts":{"test":"jshint lib/ --exclude lib/grammar.js test/ && jasmine-node test/ --captureExceptions","prepublish":"pegjs lib/grammar.peg lib/grammar.js"},"_npmUser":{"name":"cburgmer","email":"christoph.burgmer@gmail.com"},"repository":{"url":"git://github.com/cburgmer/css-font-face-src","type":"git"},"_npmVersion":"1.3.24","description":"A CSS @font-face src property value parser","directories":{},"devDependencies":{"pegjs":"~0.8.0","jshint":"~2.5.0","jasmine-node":"~1.14.3"}},"0.2.1":{"name":"css-font-face-src","version":"0.2.1","keywords":["css","parser","value","font","font-face"],"author":{"name":"Christoph Burgmer","email":"christoph.burgmer@gmail.com"},"license":"BSD-2-Clause","_id":"css-font-face-src@0.2.1","maintainers":[{"name":"cburgmer","email":"christoph.burgmer@gmail.com"}],"homepage":"https://github.com/cburgmer/css-font-face-src","bugs":{"url":"https://github.com/cburgmer/css-font-face-src/issues"},"dist":{"shasum":"94ce1878bb6c86c2aa185681dc9d97b013a51a00","tarball":"https://registry.npmjs.org/css-font-face-src/-/css-font-face-src-0.2.1.tgz","integrity":"sha512-a0T6Mf9VWeroFbK1ck1tS4biAY2bnvAo8WZyjq9EINMkeWtpjKYpKzgqXVu1VkKbjG3mOo79EjctXsFeEIm89w==","signatures":[{"sig":"MEQCIG500EGUXZbhnBh3CAq5Pe77+aZV2K91IEoVhvuBVfc/AiBgVVzNlIv4yRFTtswRtwxCnVU1MpW7wnRMtB3EsAt56Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","scripts":{"test":"jshint lib/ --exclude lib/grammar.js test/ && jasmine-node test/ --captureExceptions","prepublish":"pegjs lib/grammar.peg lib/grammar.js"},"_npmUser":{"name":"cburgmer","email":"christoph.burgmer@gmail.com"},"repository":{"url":"git://github.com/cburgmer/css-font-face-src","type":"git"},"_npmVersion":"1.3.24","description":"A CSS @font-face src property value parser","directories":{},"devDependencies":{"pegjs":"~0.8.0","jshint":"~2.5.0","jasmine-node":"~1.14.3"}},"0.2.2":{"name":"css-font-face-src","version":"0.2.2","keywords":["css","parser","value","font","font-face"],"author":{"name":"Christoph Burgmer","email":"christoph.burgmer@gmail.com"},"license":"BSD-2-Clause","_id":"css-font-face-src@0.2.2","maintainers":[{"name":"cburgmer","email":"christoph.burgmer@gmail.com"}],"homepage":"https://github.com/cburgmer/css-font-face-src","bugs":{"url":"https://github.com/cburgmer/css-font-face-src/issues"},"dist":{"shasum":"09bdaaef731b952dc7c2969bfde86559b94fffae","tarball":"https://registry.npmjs.org/css-font-face-src/-/css-font-face-src-0.2.2.tgz","integrity":"sha512-P9OY2UD248tWq317xDj1EJgMZ6Ymyrl+r0fHCauxVKUNfTgf3eYqE2KZ+UfmX8n204pg/a8/IRxEYV4yrEcziQ==","signatures":[{"sig":"MEUCIAG40B7THhaAZLbCuJse/ATn57cE3NOMBVtAGDJKjD++AiEA+B/VyctYVFyZdjb3uZZhAK4dQLe2G24wcoCSFpR+kTs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","scripts":{"test":"jshint lib/ --exclude lib/grammar/index.js test/ && jasmine-node test/ --captureExceptions"},"_npmUser":{"name":"cburgmer","email":"christoph.burgmer@gmail.com"},"repository":{"url":"git://github.com/cburgmer/css-font-face-src","type":"git"},"_npmVersion":"1.3.24","description":"A CSS @font-face src property value parser","directories":{},"devDependencies":{"pegjs":"~0.8.0","jshint":"~2.5.0","jasmine-node":"~1.14.3"}},"1.0.0":{"name":"css-font-face-src","version":"1.0.0","keywords":["css","parser","value","font","font-face"],"author":{"name":"Christoph Burgmer","email":"christoph.burgmer@gmail.com"},"license":"BSD-2-Clause","_id":"css-font-face-src@1.0.0","maintainers":[{"name":"cburgmer","email":"christoph.burgmer@gmail.com"}],"homepage":"https://github.com/cburgmer/css-font-face-src#readme","bugs":{"url":"https://github.com/cburgmer/css-font-face-src/issues"},"dist":{"shasum":"a8c6307d48d9afc84a404082cb1776cd458864b1","tarball":"https://registry.npmjs.org/css-font-face-src/-/css-font-face-src-1.0.0.tgz","integrity":"sha512-kUl2r9ZMiLKY+04SM83Rk6dLnUU/hk30aN5CSZ+ZMGWT2COCU8I7yVu8fHbfCQu7Gx1ce45W0Q9hRaw2awqlww==","signatures":[{"sig":"MEQCIDwZhpsz0gEqfTdrPNyiVXGwYm4/M9yORanJqT1ruT3fAiBrm8cLNfaodd1nfZAl6mOEs75+O7fEiLDbX/FPmL+58A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/css-font-face-src.js","_from":".","_shasum":"a8c6307d48d9afc84a404082cb1776cd458864b1","gitHead":"d481aa9d37e877b4b80b3b95c1bc2903f1b075b3","scripts":{"umd":"browserify --standalone cssFontFaceSrc lib/index.js | derequire > dist/css-font-face-src.js","dist":"npm run umd && npm run smoketest","test":"npm run grammar && npm run jshint && npm run specs","specs":"jasmine-node test/ --captureExceptions","jshint":"jshint lib/ --exclude lib/grammar/index.js test/","grammar":"pegjs -o lib/grammar/index.js lib/grammar/grammar.peg","smoketest":"phantomjs test/loadPage.js test/dist_test.html | grep font.woff"},"_npmUser":{"name":"cburgmer","email":"christoph.burgmer@gmail.com"},"repository":{"url":"git://github.com/cburgmer/css-font-face-src.git","type":"git"},"_npmVersion":"3.8.6","description":"A CSS @font-face src property value parser","directories":{},"_nodeVersion":"6.1.0","devDependencies":{"pegjs":"^0.10.0","jshint":"^2.9.4","derequire":"^2.0.3","phantomjs":"^2.1.7","browserify":"^13.1.1","jasmine-node":"^1.14.3"},"_npmOperationalInternal":{"tmp":"tmp/css-font-face-src-1.0.0.tgz_1478358729352_0.4376511068549007","host":"packages-18-east.internal.npmjs.com"}},"2.0.0":{"name":"css-font-face-src","version":"2.0.0","keywords":["css","parser","value","font","font-face"],"author":{"name":"Christoph Burgmer","email":"christoph.burgmer@gmail.com"},"license":"BSD-2-Clause","_id":"css-font-face-src@2.0.0","maintainers":[{"name":"cburgmer","email":"christoph.burgmer@gmail.com"}],"contributors":[{"name":"Mobile Design Resources","email":"mobiledesres@outlook.com"}],"homepage":"https://github.com/cburgmer/css-font-face-src#readme","bugs":{"url":"https://github.com/cburgmer/css-font-face-src/issues"},"dist":{"shasum":"f8ba33a2eefdcbd222a95047dd76964ce1f1e84d","tarball":"https://registry.npmjs.org/css-font-face-src/-/css-font-face-src-2.0.0.tgz","fileCount":29,"integrity":"sha512-RBBMHinf3JIbpLN6CbDZdDV177qcOoaUDfDN4AM9Hrsy7cMBKgJja/nu8u9kKsKELv9/RDBtr7mwFLKh5XgOoQ==","signatures":[{"sig":"MEYCIQCWiqPosQ+5ln5OBeS9Sn4qnLEO47/UUZFr/ukrQkphuwIhAOFmiQ3S8Z7mkJwEPXzO/KHhWzKHBQXn45ft8gWkehpE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":101833},"main":"dist/ts/index.js","types":"dist/ts/index.d.ts","browser":"dist/umd/index.js","gitHead":"e907aa62139d1e426255753e54e49fea8bdcceef","scripts":{"test":"npm run build && npm run test:jest && npm run test:dist","build":"npm run build:grammar && npm run build:ts && npm run build:umd","build:ts":"mkdir -p dist/ts && tsc","examples":"npm run examples:cjs && npm run examples:esm && npm run examples:ts","build:umd":"mkdir -p dist/umd && browserify --standalone cssFontFaceSrc src/index.ts -p [ tsify ] -o dist/umd/index.js","test:dist":"npm run build:umd && npm run test:smoketest","test:jest":"jest","examples:ts":"ts-node examples/ts/parse.ts && ts-node examples/ts/serialize.ts","examples:cjs":"node examples/cjs/parse.js && node examples/cjs/serialize.js","examples:esm":"node examples/esm/parse.mjs && node examples/esm/serialize.mjs","build:grammar":"peggy --plugin ts-pegjs -d util:../util -o src/grammar/index.ts src/grammar/grammar.peg # the ../util path is relative to src/grammar, i.e. where the output file src/grammar/index.ts sits","test:smoketest":"ts-node test/dist/loadPage.ts test/dist/dist_test.html | grep font.woff"},"_npmUser":{"name":"cburgmer","email":"christoph.burgmer@gmail.com"},"repository":{"url":"git://github.com/cburgmer/css-font-face-src.git","type":"git"},"_npmVersion":"8.1.2","description":"A CSS @font-face src property value parser","directories":{},"_nodeVersion":"16.13.2","_hasShrinkwrap":false,"devDependencies":{"tsify":"^5.0.4","ts-jest":"^29.0.5","ts-node":"^10.9.1","ts-pegjs":"^3.0.0","puppeteer":"^19.6.1","browserify":"^13.3.0","@types/jest":"^29.4.0","@tsconfig/recommended":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/css-font-face-src_2.0.0_1706130038664_0.013958299567086607","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"css-font-face-src","version":"2.1.0","description":"A CSS @font-face src property value parser","main":"dist/ts/index.js","types":"dist/ts/index.d.ts","browser":"dist/umd/index.js","scripts":{"build":"npm run build:grammar && npm run build:ts && npm run build:umd","build:grammar":"peggy --plugin ts-pegjs -d util:../util -o src/grammar/index.ts src/grammar/grammar.peg # the ../util path is relative to src/grammar, i.e. where the output file src/grammar/index.ts sits","build:ts":"mkdir -p dist/ts && tsc","build:umd":"mkdir -p dist/umd && browserify --standalone cssFontFaceSrc src/index.ts -p [ tsify ] -o dist/umd/index.js","examples":"npm run examples:cjs && npm run examples:esm && npm run examples:ts","examples:cjs":"node examples/cjs/parse.js && node examples/cjs/serialize.js","examples:esm":"node examples/esm/parse.mjs && node examples/esm/serialize.mjs","examples:ts":"ts-node examples/ts/parse.ts && ts-node examples/ts/serialize.ts","test":"npm run build && npm run test:jest && npm run test:dist","test:dist":"npm run build:umd && npm run test:smoketest","test:jest":"jest","test:smoketest":"ts-node test/dist/loadPage.ts test/dist/dist_test.html | grep font.woff"},"repository":{"type":"git","url":"git://github.com/cburgmer/css-font-face-src.git"},"keywords":["css","parser","value","font","font-face"],"author":{"name":"Christoph Burgmer","email":"christoph.burgmer@gmail.com"},"contributors":[{"name":"Mobile Design Resources","email":"mobiledesres@outlook.com"}],"license":"BSD-2-Clause","bugs":{"url":"https://github.com/cburgmer/css-font-face-src/issues"},"devDependencies":{"@tsconfig/recommended":"^1.0.2","@types/jest":"^29.4.0","browserify":"^13.3.0","puppeteer":"^24.23.0","ts-jest":"^29.0.5","ts-node":"^10.9.1","ts-pegjs":"^3.0.0","tsify":"^5.0.4"},"_id":"css-font-face-src@2.1.0","gitHead":"d6ac4b63e47aa060881a9d931755ccbee92c6bd8","homepage":"https://github.com/cburgmer/css-font-face-src#readme","_nodeVersion":"24.8.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-dQ9cOkSkzT5X2E+Lc9EKYiaZNyhAEETIwFiUy8I2spHWJ4/QhOCewGnPNd3eAr4A6wgK5BOg9zmCpqQ4AFCHwA==","shasum":"b023acb390f0681e1c63094b131ea69466fd5eb8","tarball":"https://registry.npmjs.org/css-font-face-src/-/css-font-face-src-2.1.0.tgz","fileCount":28,"unpackedSize":94055,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCS8saXNLWYe3EZVaOZJYa/9LJo6lHF0mOtGPR4nt7LMgIhAPaw4WHWOe/TLeDz96ChDU7qhuqkocvid9jfFCXL6xgp"}]},"_npmUser":{"name":"cburgmer","email":"christoph.burgmer@gmail.com"},"directories":{},"maintainers":[{"name":"cburgmer","email":"christoph.burgmer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/css-font-face-src_2.1.0_1759753877022_0.3185220019557342"},"_hasShrinkwrap":false}},"time":{"created":"2014-04-04T20:10:23.548Z","modified":"2025-10-06T12:31:17.406Z","0.1.0":"2014-04-04T20:12:45.372Z","0.2.0":"2014-04-05T09:35:11.122Z","0.2.1":"2014-04-05T09:43:48.180Z","0.2.2":"2014-04-05T09:53:12.282Z","1.0.0":"2016-11-05T15:12:09.891Z","2.0.0":"2024-01-24T21:00:38.887Z","2.1.0":"2025-10-06T12:31:17.223Z"},"bugs":{"url":"https://github.com/cburgmer/css-font-face-src/issues"},"author":{"name":"Christoph Burgmer","email":"christoph.burgmer@gmail.com"},"license":"BSD-2-Clause","homepage":"https://github.com/cburgmer/css-font-face-src#readme","keywords":["css","parser","value","font","font-face"],"repository":{"type":"git","url":"git://github.com/cburgmer/css-font-face-src.git"},"description":"A CSS @font-face src property value parser","contributors":[{"name":"Mobile Design Resources","email":"mobiledesres@outlook.com"}],"maintainers":[{"name":"cburgmer","email":"christoph.burgmer@gmail.com"}],"readme":"# CSS `@font-face` rule `src` field parser &ndash; `css-font-face-src`\n\n<a href=\"https://www.npmjs.org/package/css-font-face-src\">\n    <img src=\"https://badge.fury.io/js/css-font-face-src.svg\"\n         align=\"right\" alt=\"NPM version\" height=\"18\">\n</a>\n\nA CSS [@font-face](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face) `src` property value parser.\n\nBasically it provides two operations:\n\n* `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).\n* `serialize`: To convert an object array back to a CSS property string.\n\n## Examples\n\n### JavaScript verison (CJS, using `require`)\n\n#### Parse\n\n```js\nconst parser = require('css-font-face-src');\n\nconsole.log(parser.parse('local(\"The Font\"), url(\"font.otf\") format(\"opentype\"), url(\"font.woff\"), local(\"Another Font\")'));\n```\n\nwill return:\n\n```js\n[\n    { local: 'The Font' },\n    { url: 'font.otf', format: 'opentype' },\n    { url: 'font.woff' },\n    { local: 'Another Font' }\n]\n```\n\n#### Serialize\n\n```js\nconst parser = require('css-font-face-src');\n\nconsole.log(\n    parser.serialize([\n        { local: 'The Font' },\n        { url: 'font.otf', format: 'opentype' },\n        { url: 'font.woff' },\n        { local: 'Another Font' }\n    ])\n);\n```\n\nwill return:\n\n```js\n'local(\"The Font\"), url(\"font.otf\") format(\"opentype\"), url(\"font.woff\"), local(\"Another Font\")'\n```\n\n### JavaScript version (ESM, using `import`)\n\n#### Parse\n\n```js\nimport { parse } from 'css-font-face-src';\n\nconsole.log(parse('local(\"The Font\"), url(\"font.otf\") format(\"opentype\"), url(\"font.woff\"), local(\"Another Font\")'));\n```\n\nwill return:\n\n```js\n[\n    { local: 'The Font' },\n    { url: 'font.otf', format: 'opentype' },\n    { url: 'font.woff' },\n    { local: 'Another Font' }\n]\n```\n\n#### Serialize\n\n```js\nimport { serialize } from 'css-font-face-src';\n\nconsole.log(\n    serialize([\n        { local: 'The Font' },\n        { url: 'font.otf', format: 'opentype' },\n        { url: 'font.woff' },\n        { local: 'Another Font' }\n    ])\n);\n```\n\nwill return:\n\n```js\n'local(\"The Font\"), url(\"font.otf\") format(\"opentype\"), url(\"font.woff\"), local(\"Another Font\")'\n```\n\n### TypeScript version\n\n#### Parse\n\n```ts\nimport { parse } from 'css-font-face-src';\n\nconsole.log(parse('local(\"The Font\"), url(\"font.otf\") format(\"opentype\"), url(\"font.woff\"), local(\"Another Font\")'));\n```\n\nwill return:\n\n```ts\n[\n    { local: 'The Font' },\n    { url: 'font.otf', format: 'opentype' },\n    { url: 'font.woff' },\n    { local: 'Another Font' }\n]\n```\n\n#### Serialize\n\n```ts\nimport { serialize, FontFaceSrcItem } from 'css-font-face-src';\n\nconsole.log(\n    serialize([\n        { local: 'The Font' },\n        { url: 'font.otf', format: 'opentype' },\n        { url: 'font.woff' },\n        { local: 'Another Font' }\n    ] as FontFaceSrcItem[])\n);\n```\n\nwill return:\n\n```ts\n'local(\"The Font\"), url(\"font.otf\") format(\"opentype\"), url(\"font.woff\"), local(\"Another Font\")'\n```\n\n## Author\n\nChristoph Burgmer. Licensed under BSD-2-Clause. Reach out [on Twitter](https://twitter.com/cburgmer).\n","readmeFilename":"README.md","users":{"gerx03":true}}