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

safe-diffparser

v1.0.6

Published

A parser for parsing the unified diff of the outputs of SAFE

Readme

diffparser

Build Status codecov npm version

A parser for parsing the unified diff of the outputs of SAFE, Scalable Analysis Framework for ECMAScript.

Installation

npm install safe-diffparser --save

Standalone Usage

node bin path/to/diff [options]

Options:
--filter=[directory | filename]

Package Usage

Follow the below usage example

var diffparser = require('safe-diffparser');
var config = {
  'file': 'path/to/diff',
  'filter': 'filename-or-directory' // optional
};
diffparser.readFile(config, function(warnings) {
  console.log(warnings);
});

Unified Diff Example

 * Bug Detector *
 # Time for worklist order computation(s): 0.01
-arrays_1_9.js:5:1~5:14: [Warning] Too few arguments to function '_.first'.
+arrays_1_9.js:5:1~5:15: [Warning] Too few arguments to function '_.first'.
 underscore.js:19:28~19:34: [Warning] Reading absent property '_' of object 'root'.
 underscore.js:23:21~23:50: [Warning] Conditional expression 'typeof Symbol !== 'undefined'' is always false.
 underscore.js:68:9~68:27: [Warning] Conditional expression 'context === void 0' is always true.
@@ -158298,7 +158302,8 @@
 underscore.js:421:15~423:5: [Warning] Too few arguments to function 'group'.
 underscore.js:427:15~429:5: [Warning] Too few arguments to function 'group'.
 underscore.js:434:15~436:5: [Warning] Too few arguments to function 'group'.
-underscore.js:470:9~470:22: [Warning] Conditional expression 'array == null' is always true.
+underscore.js:471:9~471:18: [Warning] Implicit type-conversion in equality comparison 'undefined == null'.
+underscore.js:471:9~471:27: [Warning] Conditional expression 'n == null || guard' is always true.
 underscore.js:530:15~532:5: [Warning] Too few arguments to function 'restArgs'.
 underscore.js:566:13~568:5: [Warning] Too few arguments to function 'restArgs'.
 underscore.js:589:18~594:5: [Warning] Too few arguments to function 'restArgs'.
@@ -158330,7 +158335,7 @@
 |  SyntaxErrors      :      0 (  0.00%) |
 |  TypeErrors        :      0 (  0.00%) |
 |  URIErrors         :      0 (  0.00%) |
-|  Warnings          :     39 (100.00%) |
+|  Warnings          :     40 (100.00%) |
 =========================================
 ============ Statistics =============
 |  AbsentRead              :      1 |
@@ -158346,7 +158351,7 @@
 |  Deprecated              :      0 |
 |  FunctionArgSize         :     27 |
 |  GlobalThis              :      0 |
-|  ImplicitTypeConversion  :      1 |
+|  ImplicitTypeConversion  :      2 |
 |  AccessingNullOrUndef    :      0 |
 |  PrimitiveToObject       :      0 |
 |  RangeError              :      0 |
@@ -158360,5 +158365,5 @@
 |  RegularExpression       :      0 |
 |  WrongArgument           :      0 |
 =====================================

Output

underscore.js:471:9~471:27: [Warning] Conditional expression 'n == null || guard' is always true.
1 warning(s) found, 39/40 (97.50%) warnings(s) filtered.