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 🙏

© 2024 – Pkg Stats / Ryan Hefner

workstream-to-standup-notes

v1.0.0

Published

This code reads a directory containing CSV files and extracts data from them. It then filters the extracted data based on certain criteria, and uses it to create a new set of notes. Finally, it saves the notes as a new CSV file.

Downloads

2

Readme

workstream-to-standup-notes

This code reads a directory containing CSV files and extracts data from them. It then filters the extracted data based on certain criteria, and uses it to create a new set of notes. Finally, it saves the notes as a new CSV file.

Here is a more detailed explanation of the steps taken:

  • The code reads the files in the directory specified by the PROJECTS_LOGS_PATH constant using the fs.readdirSync() function.
  • It filters the files based on whether they have a .csv extension using the files.filter() method, and stores the resulting array in the csvFiles variable.
  • The code then creates an empty array called abc.
  • It loops through each file in the csvFiles array using the csvFiles.forEach() method.
  • For each file, the code reads the file using the fs.readFileSync() method and extracts the data as a string.
  • It then parses the string as CSV data using the parse() method from the csv-parse library, with the options columns: true and skip_empty_lines: true.
  • It filters the resulting array of records based on whether they contain a certain value for the "Team" field. The specific value(s) to be filtered is determined by the TEAMS constant.
  • For each record in the filtered array, the code extracts relevant data and creates a new object representing a note.
  • It then adds the note object to the abc array.
  • If an error occurs while reading or parsing a file, the error message is logged to the console.
  • After all the files have been processed, the code checks whether the abc array is not empty.
  • If the abc array is not empty, it converts the array to a CSV string using the json2csv.parse() method from the json2csv library.
  • It then writes the CSV string to a new file specified by the STANDUP_NOTES_PATH and STANDUP_NOTES_FILE constants using the fs.writeFile() method.
  • If an error occurs while writing the file, the error message is logged to the console.
  • If the file is successfully written, the message "Saved!" is logged to the console.