node-expat
Advanced tools
Comparing version 1.4.1 to 1.4.2
28
bench.js
@@ -1,5 +0,6 @@ | ||
var sys = require('sys'); | ||
var util = require('util'); | ||
var node_xml = require("node-xml"); | ||
var libxml = require("libxmljs"); | ||
var expat = require('./lib/node-expat'); | ||
var expat = require('node-expat'); | ||
var sax = require('sax'); | ||
@@ -18,2 +19,8 @@ function NodeXmlParser() { | ||
} | ||
function SaxParser() { | ||
var parser = sax.parser(); | ||
this.parse = function(s) { | ||
parser.write(s).close(); | ||
} | ||
} | ||
function ExpatParser() { | ||
@@ -28,2 +35,3 @@ var parser = new expat.Parser(); | ||
//var p = new LibXmlJsParser(); | ||
//var p = new SaxParser(); | ||
var p = new ExpatParser(); | ||
@@ -39,5 +47,17 @@ p.parse("<r>"); | ||
var its =[]; | ||
setInterval(function() { | ||
sys.puts(nEl + " el/s"); | ||
util.puts(nEl + " el/s"); | ||
its.push(nEl); | ||
nEl = 0; | ||
}, 1000); | ||
}, 1000); | ||
process.on('SIGINT', function () { | ||
var average = 0; | ||
its.forEach(function (v){ | ||
average += v; | ||
}); | ||
average /= its.length; | ||
util.puts("Average: " + average + " el/s"); | ||
process.exit(0); | ||
}); |
{ "name": "node-expat" | ||
,"version": "1.4.1" | ||
,"version": "1.4.2" | ||
,"main": "./lib/node-expat" | ||
,"description": "NodeJS binding for fast XML parsing." | ||
,"keywords": ["xml","sax","expat","libexpat","parse","parsing"] | ||
,"scripts" : { "install": "node-waf configure build" | ||
,"update": "node-waf build" | ||
,"test": "node test.js" | ||
,"test": "vows --spec ./test.js" | ||
} | ||
,"dependencies": [] | ||
,"devDependencies": ["vows"] | ||
,"repositories": [{ "type": "git" | ||
,"path": "git://github.com/astro/node-expat.git" | ||
}] | ||
,"dependencies": {} | ||
,"devDependencies": {"vows": ">=0.5.12"} | ||
,"repository": { "type": "git" | ||
, "path": "git://github.com/astro/node-expat.git" | ||
} | ||
,"homepage": "http://github.com/astro/node-expat" | ||
,"bugs": "http://github.com/astro/node-expat/issues" | ||
,"maintainers": [{ "name": "Astro" | ||
,"email": "astro@spaceboyz.net" | ||
,"web": "http://spaceboyz.net/~astro/" | ||
}] | ||
,"contributors": ["Stephan Maka", "Derek Hammer", "Iein Valdez", "Peter Körner", "Camilo Aguilar"] | ||
,"author": { "name": "Astro" | ||
, "email": "astro@spaceboyz.net" | ||
, "web": "http://spaceboyz.net/~astro/" | ||
} | ||
,"contributors": ["Stephan Maka", "Derek Hammer", "Iein Valdez", "Peter Körner", "Camilo Aguilar", "Michael Weibel"] | ||
,"licenses": [{ "type": "MIT" }] | ||
,"engine": "node" | ||
,"engines": { "node": ">=0.4" } | ||
} |
@@ -1,2 +0,1 @@ | ||
var sys = require('sys'); | ||
var expat = require('./lib/node-expat'); | ||
@@ -238,4 +237,4 @@ var Buffer = require('buffer').Buffer; | ||
assert.ok(true, "Did not segfault"); | ||
}, | ||
}, | ||
'parsing twice the same document with the same parser instance should be fine': 'reset() not yet implemented' | ||
@@ -252,5 +251,5 @@ /*function() { | ||
assert.ok(result2); | ||
}*/ | ||
} | ||
}).run(); | ||
}).export(module); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 4 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
36659
15
326
4