node library to process documents with sequential rules