Socket
Socket
Sign inDemoInstall

lcov-parse

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lcov-parse - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

.c9revisions/lib/index.js.c9save

10

lib/index.js

@@ -99,11 +99,13 @@ var fs = require('fs'),

});
cb(null, data);
if (data.length) {
cb(null, data);
} else {
cb('Failed to parse string');
}
};
var parse = function(file, cb) {
exists(file, function(x) {
if (!x) {
cb("Failed to find file: " + file);
return;
return walkFile(file, cb);
}

@@ -110,0 +112,0 @@ fs.readFile(file, 'utf8', function(err, str) {

2

package.json
{
"name": "lcov-parse",
"description": "Parse lcov results files and return JSON",
"version": "0.0.2",
"version": "0.0.3",
"author": "Dav Glass <davglass@gmail.com>",

@@ -6,0 +6,0 @@ "bugs": { "url" : "http://github.com/davglass/lcov-parse/issues" },

@@ -18,2 +18,8 @@ ## LCOV file parser

or
parse(lcovString, function(err, data) {
//process the data here
});
## Formatting

@@ -20,0 +26,0 @@

@@ -25,2 +25,12 @@ var vows = require('vows'),

},
'Parse as a string': {
topic: function() {
parse('TN:TestName\nSF:foobar.js\nend_of_record\n', this.callback);
},
'should parse': function(err, data) {
assert.isArray(data);
assert.equal('TestName', data[0].title);
assert.equal('foobar.js', data[0].file);
}
},
'parse the file': {

@@ -27,0 +37,0 @@ topic: function() {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc