remove config.mode, allow algo to be a function

Fixes #10, #11 

which value doesn't have toString? I know only `null` and `undefined`. 
We can treat both as "ignoring" the file, but off the top of my head I don't see the case where one can need it.