Comparing version 1.3.0 to 1.4.0
@@ -16,3 +16,3 @@ #!/usr/bin/env node | ||
'ais', | ||
'ait', | ||
'ait' | ||
]; | ||
@@ -40,3 +40,3 @@ | ||
return ids; | ||
}; | ||
} | ||
@@ -65,3 +65,3 @@ function getGraphvizSource(automata, stream) { | ||
stream.write('}\n'); | ||
}; | ||
} | ||
@@ -68,0 +68,0 @@ var trie = dtrie.createFromWords(WORDS); |
{ | ||
"name": "dtrie", | ||
"description": "Trie implementation based on a minimal automaton.", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"author": "Mathieu Turcotte <turcotte.mat@gmail.com>", | ||
@@ -13,8 +13,9 @@ "keywords": ["trie", "prefix tree", "automaton", "automata", "fsa"], | ||
"nodeunit": "0.7", | ||
"jshint": "0.7" | ||
"jshint": "0.8" | ||
}, | ||
"scripts": { | ||
"prepublish": "node_modules/jshint/bin/hint lib/* && node_modules/nodeunit/bin/nodeunit tests/unit", | ||
"pretest": "node_modules/jshint/bin/hint lib/*", | ||
"test": "node_modules/nodeunit/bin/nodeunit tests/unit" | ||
"prepublish": "node_modules/jshint/bin/hint lib/ tests/ example/ index.js && node_modules/nodeunit/bin/nodeunit tests/unit", | ||
"pretest": "node_modules/jshint/bin/hint lib/ tests/ example/ index.js", | ||
"test": "node_modules/nodeunit/bin/nodeunit tests/unit", | ||
"stress": "node tests/stress/test.js" | ||
}, | ||
@@ -21,0 +22,0 @@ "engines": { |
# Trie implementation based on a minimal automaton for Node.js [![Build Status](https://secure.travis-ci.org/MathieuTurcotte/node-trie.png)](http://travis-ci.org/MathieuTurcotte/node-trie) | ||
Implementation based on "Incremental Construction of Minimal Acyclic | ||
Finite-State Automata" by Jan Daciuk, Stoyan Mihov, Bruce W. Watson and | ||
Richard E. Watson. | ||
Implementation based on "[Incremental Construction of Minimal Acyclic | ||
Finite-State Automata](http://acl.ldc.upenn.edu/J/J00/J00-1002.pdf)" by Jan | ||
Daciuk, Stoyan Mihov, Bruce W. Watson and Richard E. Watson. | ||
@@ -13,2 +13,16 @@ ## Installation | ||
## Tests | ||
To run the unit tests: | ||
``` | ||
npm test | ||
``` | ||
To run the performance/stress tests: | ||
``` | ||
npm run-script stress | ||
``` | ||
## Usage | ||
@@ -15,0 +29,0 @@ |
@@ -48,6 +48,6 @@ #!/usr/bin/env node | ||
util.log(util.format('Populate: %dms', timeExecution(function() { | ||
dict.addAll(words); | ||
dict.populate(words); | ||
}))); | ||
util.log(util.format('Nodes : %d', dict.getNumNodes())); | ||
util.log(util.format('Nodes : %d', dict.getSize())); | ||
@@ -61,4 +61,4 @@ util.log(util.format('Lookup existing: %dms', timeExecution(function() { | ||
}))); | ||
}; | ||
} | ||
main(); |
Sorry, the diff of this file is not supported yet
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
5779055
121
0
1