indexer.js accepts also objects for indexing

For seamless use as a node module batchString can be string or object