{"id":24289264,"url":"https://github.com/rla/fast-feed","last_synced_at":"2025-09-25T12:30:48.371Z","repository":{"id":8830983,"uuid":"10532842","full_name":"rla/fast-feed","owner":"rla","description":"Very fast RapidXML-based Node.JS module for parsing newsfeeds (RSS 2 and Atom).","archived":false,"fork":false,"pushed_at":"2019-08-23T17:19:35.000Z","size":80,"stargazers_count":25,"open_issues_count":8,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-15T02:39:08.534Z","etag":null,"topics":["atom","feed","nodejs","rss"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-06T18:01:14.000Z","updated_at":"2023-04-17T16:29:02.000Z","dependencies_parsed_at":"2022-09-19T08:10:47.305Z","dependency_job_id":null,"html_url":"https://github.com/rla/fast-feed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rla%2Ffast-feed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rla%2Ffast-feed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rla%2Ffast-feed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rla%2Ffast-feed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rla","download_url":"https://codeload.github.com/rla/fast-feed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234112553,"owners_count":18781792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","feed","nodejs","rss"],"created_at":"2025-01-16T10:51:45.291Z","updated_at":"2025-09-25T12:30:48.031Z","avatar_url":"https://github.com/rla.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fast-feed\n\nNode.JS module for parsing newsfeeds (RSS 2 and Atom). It should be one\nof the fastest feed parsers. Uses [RapidXML](http://rapidxml.sourceforge.net/).\n\n[![Build Status](https://travis-ci.org/rla/fast-feed.svg)](https://travis-ci.org/rla/fast-feed)\n\n## Usage\n\nWithout callback (throws exception):\n\n```javascript\nvar fastFeed = require('fast-feed');\nfastFeed.parse(xml_string);\n```\n\nWith callback:\n\n```javascript\nvar fastFeed = require('fast-feed');\nfastFeed.parse(xml_string, function(err, feed) {\n    if (err) throw err;\n    console.log(feed);\n});\n```\n\nDo not parse content/description:\n\n```javascript\nvar fastFeed = require('fast-feed');\nfastFeed.parse(xml_string, { content: false });\n```\n\nOr:\n\n```javascript\nvar fastFeed = require('fast-feed');\nfastFeed.parse(xml_string, { content: false }, function(err, feed) {\n    if (err) throw err;\n    console.log(feed);\n});\n```\n\n## Extracted feed attributes\n\nFor Atom feeds:\n\n```javascript\n{\n    type: \"atom\",\n    title: String,\n    id: String,\n    link: String,\n    author: String,\n    author_uri: String,\n    author_email: String,\n    extensions: [Extension],\n    items: [{\n        id: String,\n        title: String,\n        date: Date,\n        author: String,\n        author_uri: String,\n        author_email: String,\n        summary: String,\n        content: String,\n        links: [{\n            rel: String,\n            href: String,\n            type: String,\n            hreflang: String,\n            title: String,\n            length: String,\n            text: String\n        }],\n        link: String,\n        extensions: [Extension]\n    }]\n}\n```\n\nAny attribute besides `type` might be missing. `summary` and `content` are missing when\nthe `content: false` option is used.\n\nFor RSS 2 feeds:\n\n```javascript\n{\n    type: \"rss\",\n    title: String,\n    description: String,\n    link: String,\n    author: String,\n    extensions: [Extension],\n    items: [{\n        id: String,\n        link: String,\n        date: Date,\n        title: String,\n        author: String,\n        description: String,\n        content: String,\n        extensions: [Extension],\n        categories: [Category],\n        enclosure: Enclosure\n    }]\n}\n```\n\nAny attribute besides `type` might be missing. `description` is missing from items when\nthe `content: false` option is used.\n\nThe `content` property of an RSS 2 item is extracted when the item contains a `\u003ccontent:encoded\u003e` element.\nThe information about the content module can be found on [MDN](https://developer.mozilla.org/en-US/docs/Web/RSS/Article/Why_RSS_Content_Module_is_Popular_-_Including_HTML_Contents).\n\n### Item categories\n\nThe category object currently contains the following properties:\n\n```javascript\n{\n    name: String // RSS 2 category tag text contents\n}\n```\n\nThe `categories` property on the item is missing when it has no categories.\n\n### Enclosure\n\nThe RSS 2 enclosure object contains the following properties:\n\n```javascript\n{\n    length: Number,\n    type: String,\n    url: String\n}\n```\n\nThe `enclosure` property on the item is missing when it has no enclosure.\nProperties of the `enclosure` might be missing. If the original length attribute\ncannot be parsed as a number, the corresponding property is missing.\n\n### Feed extensions\n\nFeed extensions are supported on the syntax level. Particulary, any element on the feed/channel/item using a namespace\nand having no nested elements is considered an extension. Extensions contain the following data:\n\n```javascript\n{\n    name: String, // name of the element, such as dc:title\n    value: String, // string contents of the element\n    attributes: { String: String } // element attributes\n}\n```\n\nParsing feed extensions is not enabled by default. Use the `extensions: true` option\nfor the `parse` function to enable them. The `extensions`/`attributes` property will be missing instead\nof being empty when the feed/item has no extension. This has been done to reduce the gc stress.\n\nA single element can have multiple extensions with the same name. Extension names are\nnot normalized into lowercase.\n\n## Supported Node/io.js versions\n\nThis package uses [NAN](https://github.com/rvagg/nan) and has been tested (install+running tests) on:\n\n * Node 10.x\n * Node 8.x\n * Node 6.x\n\n## Using on Windows\n\nThis package provides no prebuilt binaries. You need to install the\nrequired tools and rebuild it yourself. Use the instructions from\nhttps://github.com/nodejs/node-gyp\n\n## Developing\n\nGo to the project directory and install dependencies:\n\n    npm install\n\nRun tests (this also rebuilds the code):\n\n    npm test\n\n## Testing leaks\n\nLeak testing uses assumption that RSS (not the feed but memory) set grows slowly. If it grows\nfast then the extension (or something else) leaks.\n\nLeak testing is started by running:\n\n    npm run test-leak\n\n### Good\n\nRSS grows slowly:\n\n```\n$ npm run test-leak\nnode --gc_global tests-leak/cdata.js\n{ rss: 12419072, heapTotal: 6163968, heapUsed: 2259008 }\n{ rss: 12955648, heapTotal: 6163968, heapUsed: 2392424 }\n{ rss: 12955648, heapTotal: 6163968, heapUsed: 2257952 }\n{ rss: 12955648, heapTotal: 6163968, heapUsed: 2118152 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 1976096 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 3899040 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 3755944 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 3614592 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 3473584 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 3331376 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 3188704 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 3048720 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 2905936 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 2764424 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 2623784 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 2481888 }\n{ rss: 14901248, heapTotal: 8261120, heapUsed: 2340056 }\n```\n\n### Bad\n\nRSS grows rapidly:\n\n```\n$ npm run test-leak\nnode --gc_global tests-leak/cdata.js\n{ rss: 79446016, heapTotal: 6163968, heapUsed: 2259008 }\n{ rss: 146755584, heapTotal: 6163968, heapUsed: 2392424 }\n{ rss: 213798912, heapTotal: 6163968, heapUsed: 2257952 }\n{ rss: 281112576, heapTotal: 6163968, heapUsed: 2118152 }\n{ rss: 349970432, heapTotal: 8261120, heapUsed: 1976096 }\n{ rss: 417284096, heapTotal: 8261120, heapUsed: 3899040 }\n{ rss: 484597760, heapTotal: 8261120, heapUsed: 3755944 }\n{ rss: 551641088, heapTotal: 8261120, heapUsed: 3614592 }\n{ rss: 618954752, heapTotal: 8261120, heapUsed: 3473584 }\n{ rss: 685998080, heapTotal: 8261120, heapUsed: 3331376 }\n{ rss: 753311744, heapTotal: 8261120, heapUsed: 3188704 }\n{ rss: 820625408, heapTotal: 8261120, heapUsed: 3048720 }\n{ rss: 887668736, heapTotal: 8261120, heapUsed: 2905936 }\n{ rss: 954982400, heapTotal: 8261120, heapUsed: 2764424 }\n{ rss: 1022025728, heapTotal: 8261120, heapUsed: 2623784 }\n{ rss: 1089339392, heapTotal: 8261120, heapUsed: 2481888 }\n```\n\n## License\n\nThe binding code is covered with the MIT license. RapidXML is dual-licensed\n(MIT and Boost Software License, see LICENSE.rapidxml).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frla%2Ffast-feed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frla%2Ffast-feed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frla%2Ffast-feed/lists"}