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

ntodo

v1.0.2

Published

A simple CLI TODO/FIXME parser for the lazy coder

Downloads

10

Readme

ntodo Build Status

A simple to use CLI TODO/FIXME parser for the lazy coder

Screenshot

The much much simpler version is to just use git grep

  $ git grep -EI "TODO|FIXME"

You can find the full documentation here

ntodo is useful if you are looking for something you can interact with both via terminal and also programatically and pull more meta data like author, date added, etc as an array of objects.

ntodo will also include the ability to prioritize and synchronize with your own task tools while keeping the easy to use in-code TODO and FIXME convention.

The issue today with TODO and FIXME is that they never get looked at... unless you run into them while fixing code.

Installation

  $ [sudo] npm install ntodo -g

Usage

There are two ways to view TODOs: through the command line or by using ntodo in your code. Note: If you are using ntodo programatically see example below.

To add new TODOs it is super easy. Simply add a TODO to your source code

// TODO: new todo text here 

Then pull them via your terminal or code. It will output a summary of TODOs with the line number of where to find it. You can also track general TODOs inside .todo.js at the root of your project.

Command Line Usage

Options

    $ ntodo --help
    Usage: ntodo [Options]
    
    [Options]
    
    -h, --help      Display help
    -p, --path      It sets the path
                      ex: ntodo -p ./
    -s, --summary   Output summary
                      ex: ntodo -s ./
    
    you can also skip the -p 
    
    ntodo .
    ntodo ./    

Example

Standard search

  $ ntodo ./

Get summary

  $ ntodo -s ./

This returns a summary instead of a list of TODOs. This can be interesting when analyzing multiple projects to see how many TODOs are there in aggregate like this:

  $ ntodo -s ./folder_with_all_projects/
    +++++++++

    Total Number of TODOs: 4000

    Inside the following folders:

    ./application1 3000

    ./application2 1000

Programatically

You can also use ntodo from inside your own node.js code.

  var ntodo = require('ntodo');

  var results = (err, results) => {
    console.log("results: %s", results)
    console.log("errors: %s", err)
  }

  ntodo.search("./", results);

You should see something like this

results: [
  {"file_name":"bin/app.js"
  ,"todos":[
      {"line":"// TODO: Add file watcher","line_number":20}
    , {"line":"// TODO: clean up the emtpy todos and then callback","line_number":128}]}
 ,{"file_name":"bin/cli.js"
  ,"todos":[
      {"line":"// TODO: Add the ability to remove the TODO line... more options","line_number":67}
     ,{"line":"// TODO: Add the ability to connect your todo app or Github","line_number":68}]}
 ,{"file_name":"test/test.js","todos":[
      {"line":"// TODO: create test","line_number":0}]}
 ]
errors: null