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

sheet-parser

v1.0.7

Published

A lightweight Node.js library for parsing CSV, XLSX, and structured data formats.

Readme

Sheet-Parser

A lightweight Node.js library for parsing CSV, XLSX, and other structured data formats into usable JavaScript objects. Designed for performance and scalability, it handles large files efficiently and supports various encodings.


Features

  • 🌟 Parse CSV files into structured JavaScript objects.
  • 📂 Scalable: Handles small files (KBs) to large datasets (GBs) seamlessly.
  • 🔤 Encoding Support: Decode files with encodings like UTF-8, ISO-8859-1, and Windows-1252.
  • ⚙️ Stream-Based: Efficient parsing for memory-intensive operations.
  • 🛠️ Extensible: Designed to support future additions like XLSX parsing.

Installation

To install the library, run:

npm install sheet-parser

Usage

Basic Example

Here’s how to parse a simple CSV file:

const { parseCSV } = require('sheet-parser');
const path = require('path');

(async () => {
    const filePath = path.resolve(__dirname, './sample.csv');
    const data = await parseCSV(filePath); // Default delimiter: ','; Default encoding: 'utf8'
    console.log(data);
})();

Input sample.csv:

name,age,city
John,30,New York
Jane,25,Los Angeles

Output:

[
  { "name": "John", "age": "30", "city": "New York" },
  { "name": "Jane", "age": "25", "city": "Los Angeles" }
]

API Reference

parseCSV

  • Description: Parses a CSV file into an array of objects.
  • Parameters:
    • filePath (string, required): Path to the input CSV file.
    • delimiter (string, optional): Character used to separate fields (default: ,).
    • encoding (string, optional): File encoding (default: utf8).
  • Returns: A Promise that resolves to an array of objects.

Example:

const data = await parseCSV('./data.csv', ',', 'utf8');

Supported Features

  • ✅ Multi-line fields
  • ✅ Fields with embedded delimiters
  • ✅ Custom delimiters
  • ✅ Support for various encodings
  • ✅ Robust handling of missing or null values

Contributing

We welcome contributions to improve this library! Here's how you can help:

  1. Fork the repository.
  2. Create a new branch for your feature/bug fix.
  3. Submit a pull request with a clear description of the change.

If you encounter any issues or have feature requests, please create an issue by following these steps:

  1. Go to the Issues page of the GitHub repository.
  2. Click on New Issue.
  3. Provide a clear title and detailed description of the problem or feature request.

Changelog

v1.0.0

  • Initial release with support for CSV parsing.
  • Features:
    • Handle large files using streams.
    • Multi-encoding support.
    • Output CSV as JavaScript objects.

License

This project is licensed under the MIT License. See the LICENSE file for details.