npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rdesc-parser

v4.0.1

Published

Parser for R package DESCRIPTION files.

Downloads

181

Readme

rdesc-parser

Parse R package DESCRIPTION files

Examples

Parsing files and streams

This package can parse DESCRIPTION from a file or a stream:

  • parse_stream(stream)
  • parse_file(path)

Both functions return a promise and auto-detect the input format using the magic byte. We support 5 types:

  • text/plain: plain-text file in dcf format (i.e. raw DESCRIPTION file)
  • application/zip: zip archive containing one file named DESCRIPTION
  • application/gzip: tar.gz archive containing one file named DESCRIPTION
  • application/zstd: tar.zstd archive containing one file named DESCRIPTION
  • other: uncomprssed tarball archive containing one file named DESCRIPTION
// npm install rdesc-parser
let { parse_stream } = await import("rdesc-parser");
let stream = fs.createReadStream('DESCRIPTION');
var desc = await parse_stream(stream);
desc

We get same result by reading the file directly:

let { parse_file } = await import("rdesc-parser");
var desc = await parse_file('DESCRIPTION');
desc
{
  Package: 'sysreqs',
  Title: 'Install SystemRequirements of Packages',
  Version: '1.0.0.9000',
  Author: 'Gabor Csardi',
  Maintainer: 'Gabor Csardi <[email protected]>',
  Description: 'Automatically download and install system requirements of R packages.',
  License: 'MIT + file LICENSE',
  LazyData: 'true',
  URL: 'https://github.com/r-hub/sysreqs',
  BugReports: 'https://github.com/r-hub/sysreqs/issues',
  RoxygenNote: '5.0.1.9000',
  Suggests: [ { package: 'testthat' } ],
  Imports: [ { package: 'debugme' }, { package: 'desc' }, { package: 'utils' } ]
}

Parsing from package files

The same interface is used for tar.zstd, .tar.gz, .tar and .zip package files.

let { parse_file } = await import("rdesc-parser");
var desc = await parse_file('curl_7.0.0.tar.gz');
desc

We can use parse_stream to read a DESCRIPTION directly from an internet stream:

let { Readable } = await import( "stream");
let { parse_stream } = await import("rdesc-parser");
let response = await fetch('https://cran.r-project.org/src/contrib/Archive/curl/curl_6.0.0.tar.gz');
var desc = parse_stream(Readable.fromWeb(response.body));
desc

License

ISC @ Gábor Csárdi

This repo is part of the R-hub project