Skip to content

Commit

Permalink
Adding pure JavaScript example.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hudson committed Mar 24, 2013
1 parent 458e42e commit d5b2a4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/example.js
@@ -0,0 +1,9 @@
var generator = new (require ('../')).WordGenerator

generator.generateTree( function () {
var word = 'matthew'
console.log ('Looking up anagrams for the name "' + word + '"...')
var init = new Date()
console.log (generator.getAnagrams(word))
console.log ('Lookup of "' + word + '" took ' + (new Date() - init) + 'ms to complete')
});

0 comments on commit d5b2a4a

Please sign in to comment.