a simple anagram generator


A simple anagram generation library for use with nodejs. Forked from jeresig/trie-js by John Resig.

$ npm install anagram
var anagram = require('anagram');
anagram.init('../dict/twl06.js', function(err) {
    if (err) throw err;
    anagram.findAnagrams('dog', function(erranagrams) {
        console.log('`%s`: found %d anagrams', anagrams.input, anagrams.count);

anagram comes packed with two executables: anagram and anagram-build

$ anagram-build -f dict/twl06.txt > dict/twl06.js
$ anagram -d dict/twl06.js -w anagr?m

Install development dependencies:

$ npm install -d

Run the tests:

$ npm test

Copyright (c) 2012 Ryan Nauman

MIT Licensed